0

我的项目基于具有多个 UINavigationContollers 的 UITabBarController。我正在调整应用程序以支持 iOS 6 中的旋转。我制作了 UITabBarController 的子类,以便可以阻止旋转。这很完美。但是 MoreNavigationViewController 有问题。在 iOS 5 上它会旋转,而在 iOS 6 上则不会。我的目标是阻止它。我必须支持所有方向(在 Info.plist 中),因为我使用的是 MPMoviePlayerViewController,它可以适应旋转。有没有办法继承 MoreNavigationViewController?

4

1 回答 1

0

如果有人会遇到同样的情况,这就是我为解决它所做的事情:

  1. Info.plist 支持所有方向
  2. 在 UITabBarController 的自定义子类中,我添加了此方法

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{
            return UIInterfaceOrientationIsPortrait(interfaceOrientation); 
    }
    

适用于 iOS 5 和 iOS 6。

于 2012-10-11T11:48:36.517 回答