I have a UIScrollView开发者_JS百科 with paging enabled.
Each page is of width 768.0px in portrait mode and 1024.0px in landscape mode. If I am in the second page in the portrait mode, then the content offset for the UIScrollView is 768.0. However, if I scroll to the next page and rotate the device to landscape at the same time, the content offset does not update and remains at 768.0 instead of the expected content offset 2048.0, giving wrong results. Any idea on how i can invoke thescrollViewDidEndDecelerating:
with the updated values?
Thanks in advance!Check the rotation delegate methods for view controller which manages the scroll view. I'd suggest disabling user interaction while rotation is in progress (with willRotate...
and didRotate...
delegate methods) since you're doing frame resizing for scroll view and it's subviews.
精彩评论