Question

I have a bunch of scrolling views displayed by Navigationbar.PushViewController(...). When I show them these controls have their contentOffset set. The problem is that after tapping a back button in the navigationbar this offset is changed to Point 0,0 and after that it goes to the correct value. The setting to 0,0 causes my controls to load data while not required (offset was not changed by user). How can I avoid this 'temporary reset'of the offset?

Was it helpful?

Solution

Have you tried storing the contentOffset in a variable in ViewWillDisappear? Then resetting contentOffset in ViewDidAppear?

I think the contentOffset functionality you are experiencing is a feature (ha ha) of UIKit.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top