1
votes

I've got a UINavigationController with a bunch of view controllers stacked on it. Not all of the view controller's orientations are compatible. For example, I've got one landscape view that I push a portrait view on top of. shouldAutoRotateToInterfaceOrientation gets called asking for landscape, i return NO but it goes to landscape anyway. Now in this view if i then rotate to portrait, it rotates and is stuck there (as it should be to begin with). But when i pop the view, the view underneath it which was in landscape is now in portrait which it shouldn't be!

WTF??????????????????

workarounds? advice? solutions? anything?

iOS 4.1

2

2 Answers

0
votes

It seems this was a bug with UINavigationController. I wound up using some modal view controllers for the top-stack items instead of pushing them on the stack. This fixed my issue.

0
votes

The problem is that the call to methods like shouldAutoRotate is sent to the navigation controller not the views in the stack. You have a choice either to do everything at the nav controller level or to do what you did and switch to modal segues.