我的项目基于UITabBarController和多个UINavigationContollers。我正在调整app以支持iOS 6中的旋转。我已经创建了UITabBarController的子类,以便我可以阻止旋转。这很完美。但是MoreNavigationViewController存在问题。在iOS 5上,它会旋转,在iOS 6上则不会。我的目标是阻止它。我必须支持所有方向(在Info.plist中)因为我正在使用MPMoviePlayerViewController,它可以调整为旋转。有没有办法继承MoreNavigationViewController?
答案 0 :(得分:0)
如果有人会遇到同样的情况,这就是我为解决这个问题所做的工作:
在UITabBarController的自定义子类中,我添加了此方法
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{
return UIInterfaceOrientationIsPortrait(interfaceOrientation);
}
适用于iOS 5和iOS 6。