jonathanpeppers
jonathanpeppers

Reputation: 26495

Strange UINavigationController Behavior in iPad app

I have an application with a UISplitViewController as the root controller. In the master side of the controller is the standard UINavigationController with UITableControllers inside. In the detail side is just a simple UIWebView.

I can get my UINavigationController to start exibiting some weird behavior after doing the following:

  1. Rotate portrait
  2. Bring up the master view by clicking my UIBarButtonItem
  3. Navigate around in the master view by going into the nav tree and popping back out
  4. Rotate to landscape
  5. Navigate around in the master view just as before

When the UINavigationController is popped in step 5, the animated is all jacked up. The whole screen animates vertically down, instead of the the UINavigationController animating as usual. It seems to be very related to the UISplitController and rotation.

Anyone heard of this issue or know a workaround? I dont't think I'm doing anything advanced here. If I disable the animation of the UINavigationController, all works as usual, but I don't want to do that since the animation looks pretty slick when working properly.

Upvotes: 2

Views: 757

Answers (1)

jonathanpeppers
jonathanpeppers

Reputation: 26495

To fix this issue you need to implement ShouldAutoRotateToInterfaceOrientation in all UINavigationControllers.

It is only an issue on iPad for some reason. EDIT: my case only failed on iPad, so this may not be true in other cases.

Upvotes: 4

Related Questions