Reputation: 1299
I have an app with a mainwindow which contains a tabbar controller and a number of different views. I want the whole thing to be able to rotate in each direction, however doing
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return YES;
}
didn't help, while that did work in other apps.
Upvotes: 1
Views: 999
Reputation: 22264
The UITabBarController
requires that you enable rotation on all view controllers it manages. So each view controller should return YES for that method for the orientations you wish to rotate to.
Upvotes: 2
Reputation: 4752
If you wanted each view to rotate, you have to return YES
on each view in the tab bar controller as well.
Upvotes: 1