views:

25

answers:

1

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!

A: 

Just return YES from that method, try again.

jer
I tried that, no go :/
Ryan Garchinsky
Ensure that all of your view controllers implement that method the same way. One or more aren't allowing rotation.
jer
I have that method in each VC and the root still won't auto-rotate, but the other VCs will. If I load a VC and go into landscape, and press Back on the navbar to get back to the root, it only then will appear in landscape.
Ryan Garchinsky
Then there's something on that view which doesn't want to autorotate. The thing about rotations is, everyone has to want to do it, or nobody does. Look at everything again, you're missing something.
jer
On the root view there are 8 rounded rect buttons that contain images, the navbar and that is it. 4 of those buttons open view that will auto-rotate, the other 4 do nothing as of yet.
Ryan Garchinsky