MaikelS
MaikelS

Reputation: 1299

Rotate view iPhone tabbar app

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

Answers (2)

Ken Pespisa
Ken Pespisa

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

Espresso
Espresso

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

Related Questions