I’m trying to add autorotation to my app, but having difficulty. I can get everything to resize (a TableView and a couple of labels), but the status bar and the rest of my window (eg: a tab bar and navigation controller) remains in portrait. I have a three view heirarchy from the window to the top ViewController and I have everything in shouldAutorotateToInterfaceOrientation set to YES, I also have everything except upside-down selected in the Summary section of the target’s properties but it refuses to budge. This happens on the simulator and on a iPhone 4. Both are 4.3 on XCode 4. I’ve scoured the apple docs on view orientations but is there somewhere else I need to set this?
In my Info.plist, I have the following:
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
I eventually found out that if you have a UITabBarController, all of the tab views need to support rotation. Should save someone some time by remembering:
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)durationmethod