0

I am changing content offset programically with:

tableView.contentOffset.y += 100

This works well when the tableview is not scrolling at all. But when there is a scrolling animation, or when user is scrolling then it is reverted.

I've noticed UICollectionView allows you to keep the animation, and user interaction and move the scroll view with contentOffset, but I am not able to use UICollectionView.

Any ideas how can I change tableview's contentOffset even during user scrolling?

Swift playground: https://gist.github.com/patryk-sredzinski/8f7111acbe7b1a65406463f70866b0b9.js (inserting rows on top, changing the offset to keep user at the same cells, but whenever user scrolls on tableview, these offset changes breaks)

XFawkes
  • 381
  • 1
  • 11

0 Answers0