Question

i've got a iPad TabBarApplication. i subclassed the TabbarController to make the Application react to a orientation change:

@implementation frankenlandTabBarController

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return (
            interfaceOrientation == UIInterfaceOrientationPortrait || 
            interfaceOrientation == UIInterfaceOrientationLandscapeLeft || 
            interfaceOrientation == UIInterfaceOrientationLandscapeRight
            );
}


@end

the problem now is, that i dont want ALL viewcontrollers of my tabbarapp in this orientations.

overwriting the shouldAutorotateToInterfaceOrientation method in a single controller does not have any effect.

any ideas?

thanks!

Was it helpful?

Solution

It's not possible to change the orientation for one view in a tabBar and not for another. If a TabBar is specified then all the subviews (tabs) must have the same orientation appearance. You must set the orientation in each ViewController and in the TabBarController.

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