cocoa touch – UINavigationBar root view doesn’t rotate into landscape – Education Career Blog

I have an application with a main menu screen consisting of a few buttons on link to other view controllers using a navigation bar which are consist of web views.

In each of my view controllers including the root I have the following method to auto-rotate:

  • (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)x
    {
    return (x == UIInterfaceOrientationPortrait) || UIInterfaceOrientationIsLandscape(x);
    }

When I press a button and load any of the other views, they rotate to landscape mode fine with, and if I hit back, my main menu is loaded in landscape mode.

BUT if I just try to goto landscape mode right from the main menu, nothing happens. I have tried a bunch a different ways to fix this but nothing has helped.

Any help would be greatly appreciated, I have been pulling my hair out for a couple days now trying to get this working!

,

Just return YES from that method, try again.

Leave a Comment