Question

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

Was it helpful?

Solution

You can try to use approach similar to Apple's AlternateViews sample.
Basically you should:

  1. Create your landscape view with appropriate size (480x300 for landscape if standard statusbar is visible)
  2. In your button handler push your landscape calling -pushModalViewController on your current view controller
  3. Apply necessary affine transformation to your view to be displayed correctly in landscape.

OTHER TIPS

Use presentModalViewController:animated: and implement the modal view controller's shouldAutorotateToInterfaceOrientation: accordingly.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top