문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top