September 21, 2012
Posted by William
Three20 iOS 6 Rotation
Today, I was working on updating one of my apps for the iPhone 5 and after dealing with iOS 6. I realized my view controllers weren’t rotating. All that was required was simply adding this line after the TTNavigator had been setup.
[[[UIApplication sharedApplication] keyWindow] setRootViewController:[[TTNavigator navigator] rootViewController]];
This is due to the changes in the ViewController rotation API in iOS 6. A rootviewcontroller must be set for the main window of the application.




4 Comments
September 23, 2012
Thanks,
did you know how to block the rotation only in some views oh the project?
Thank you.
September 23, 2012
All you need to do to handle individual view controller rotation is add the methods shouldAutorotate and supportedInterfaceOrientations.
Both are in the new UIViewController documentation.
September 23, 2012
Thanks! It works
October 18, 2012
This doesn’t seem to work for me, please could you include your setup code for three20? eg when you first set up the TTNavigator, and call the first url? I have tried the above and shouldAutoRotate never gets called in the first view controller which three20 visits. If however I init the view controller myself and set window.rootViewController = myFirstViewController, shouldAutoRotate does get called! Very odd!
Thanks
Leave a comment