I have an application with a UISplitViewContr开发者_如何学编程oller 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:
- Rotate portrait
- Bring up the master view by clicking my UIBarButtonItem
- Navigate around in the master view by going into the nav tree and popping back out
- Rotate to landscape
- 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.
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.
精彩评论