I'm trying to work with the iOS6 Auto-rotation mess.
I've looked at almost every single SO question relating to it, and no matter what I try, I can't get rotation working how I need it.
The app is using storyboards, and the layout is as follows:
Navigation controller ---> Root view controller ---> Tab view controller ---> View controller ---> Landscape view controller.
The view controller auto-rotates when I rotate the simulator, but when segueing back to the previous view (that is set to portrait), the view becomes landscape, when it should be portrait. If I rotate the simulator back, the view auto-rotates to portrait again, but this should've been done automatically!
I've implemented (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
and it doesn't get called in any view controller I put it in.
I've subclassed the NavigationController to return the topViewController
's shouldAutoRotate
, supportedInterfaceOrientations
and preferredInterfaceOrientationForPresentation
and auto-rotation when rotating the simulator seems to work, but preferredInterfaceOrientationForPresentation
never does its job.
Does anyone have a solution to this?