UITabbar Application with different Orientations
i've got a iPad TabBarApplication. i subclassed the TabbarController to make the Application react to a orientation change:
@implementation frankenlandTabBarController
- (BOOL)shouldAutorotateToInterfaceOrientati开发者_运维知识库on:(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!
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.
精彩评论