Reputation: 10329
I have a UITabbarController with (so far) two navigation controller items. I can get the application to rotate by adding the shouldAutorotateToInterfaceOrientation to each class... but thats not exactly what I want.
What I want to do is to add a button in the UINavigationBar in one of the classes. When this button is pressed I want it to load another view into landscape mode. This view should not show any navigationbar or tabbar controller.
How can I get this to work?
Best regards, Paul Peelen
Upvotes: 1
Views: 786
Reputation: 170839
You can try to use approach similar to Apple's AlternateViews sample.
Basically you should:
-pushModalViewController
on your current view controllerUpvotes: 3
Reputation: 135548
Use presentModalViewController:animated:
and implement the modal view controller's shouldAutorotateToInterfaceOrientation:
accordingly.
Upvotes: 3