ole / OLEContainerScrollView

A UIScrollView subclass that intelligently handles multiple child scroll views and does not interfere with UIKitʼs cell reuse functionality.
http://oleb.net/blog/2014/05/scrollviews-inside-scrollviews/
MIT License
587 stars 67 forks source link

setContentOffset:animated: does not work as expected on child scroll views #22

Closed tomaskraina closed 6 years ago

tomaskraina commented 6 years ago

I have a bit more complex setup in my app where I set the content offset directly on a table view in code. This table view and it's UITableViewController have no knowledge of OLEContainerScrollView.

Setting the content inset breaks the layout. Any idea how to make this setup work correctly?

I guess OLEContainerScrollView could observe the contentOffset and if it changed outside of its layoutSubviews implementation, it could adjust the layout accordingly.

EDIT:

What I actually need is to call scrollToRow(at:at:animated:) on the tableView, not setting the content offset.

ole commented 6 years ago

Closing this because I'm going to archive this project.