Objective c 不同方向的UITabbar应用

Objective c 不同方向的UITabbar应用,objective-c,ipad,ios,uitabbarcontroller,uiinterfaceorientation,Objective C,Ipad,Ios,Uitabbarcontroller,Uiinterfaceorientation,我有一个iPad标签应用程序。我将TabbarController子类化,以使应用程序对方向更改作出反应: @frankenlandTabBarController的实现 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return ( interfaceOrientation == UIInterfaceOrientatio

我有一个iPad标签应用程序。我将TabbarController子类化,以使应用程序对方向更改作出反应:

@frankenlandTabBarController的实现

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


@end
现在的问题是,我不希望tabbarapp的所有ViewController都在这个方向


在单个控制器中覆盖
shouldAutorotateToInterfaceOrientation
方法不会产生任何效果

有什么想法吗


谢谢

不可能在选项卡栏中更改一个视图的方向,也不可能更改另一个视图的方向。如果指定了选项卡栏,则所有子视图(选项卡)必须具有相同的方向外观。您必须在每个ViewController和TabBarController中设置方向。

在特定的视图控制器中实现所提到的
shouldAutorotateToInterfaceOrientation
方法以防止旋转对我有效。@brutella也在tabbar应用程序中?shouldAutorotateToInterfaceOrientation仅对顶级视图控制器。只要这是选项卡栏控制器,其他视图就没有机会更改它。