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

Fixing occasional wrong layout. #12

Closed imaks closed 9 years ago

imaks commented 9 years ago

Hi and thanks for useful project, it helped me a lot!

I've found an edge case and came up with quick and dirty fix for it, any improvements are appreciated.

Sometimes contentOffset of containerView, that is used for positioning of subviews during layout, is not final and may change after contentSize change. This can happen when containerView is scrolled to bottom and some cells are deleted from tableView, that is located at the bottom. This triggers layoutSubviews during which contentOffset contains not updated value.

Here is an example project: https://github.com/imaks/OLEContainerScrollViewBug

ole commented 9 years ago

Thanks a lot. Sorry for replying so late.