1
votes

I have a UIViewController with a paged UIScrollView (3 pages). My View always starts at the second page, the middle one. The problem is that when I hit the back button in the UINavigationBar, the UIScrollView scrolls to the first page, and after that it disappears (popped from Nav Controller's stack).
The visible animation behaviour is horrible.

I want the UIScrollView not to scroll when I hit the BACK button in the UINavigationBar.

The same happens when I drag the left side of the screen to the right (triggers the BACK behaviour).

1
If you can reduce this to really simple project (one nav controller, two view controllers) with little or no code, would make an excellent bug report to Apple. - matt
However, you have to make sure that you are not causing the scrolling somehow. Look for implementation of viewWillDisappear, for example, where you might be scrolling (or something). That is why I say you need to reproduce with no code, so you can prove it isn't you. - matt
@matt I re-searched for scrolling code, and debugged the UIScrollView delegate callbacks, but nothing. I will make a simple project as you said, to see if I can reproduce the same behaviour, thanks! - 6rod9

1 Answers

1
votes

With some good debugging I noticed out that the scroll view wasn't scrolling during the "Back" transition. It was just part of the left pages that were visible during the transition.

So with a simple [scrollView clipsToBounds] the problem was solved :).