views:

663

answers:

1

In an iPad application with a UINavigationController, everything works in portrait mode but in landscape mode the back button sometimes only goes back half a level. That is to say, on the first press the title bar animates as if it was popping a controller, and on the second press it animates the content popping.

Has anyone found a solution to this? The contradictory solution in this question did not help. I have a shouldAutorotate method in the navigation controller but no others.

-(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)inOrientation {
    return YES;
}

Edit:

actually, the first click pops the content and the second click pops the navigation bar.

+7  A: 

As David F figured out but I did not grok, every view controller must implement a shouldAutorotate method if the navigation controller does. Even though it will go ahead and rotate, and you do not need it on the iPhone, somehow the iPad thinks a view controller needs a double pop if it does not respond to that method with the same result as the navigation controller.

drawnonward
Thanks! Exactly my problem!
Serge van den Oever