开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜