2012-10-11 67 views
0

我的項目基於UITabBarController和多個UINavigationContollers。我正在調整應用程序以支持iOS 6中的旋轉。我已經創建了UITabBarController的子類,以便可以阻止旋轉。這是完美的。但是MoreNavigationViewController存在問題。在iOS 5上旋轉,在iOS 6上不旋轉。我的目標是阻止它。我必須支持所有的方向(在Info.plist中),因爲我正在使用MPMoviePlayerViewController,它可以適應旋轉。有沒有辦法繼承MoreNavigationViewController?iOS 5和iOS 6 UITabBarController MoreNavigationViewController rotation

回答

0

如果任何人都會有同樣的情況,這是我做了什麼來解決這個問題:

  1. 的Info.plist支持所有方向
  2. 在的UITabBarController的自定義子類我加入這個方法

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

作品兩者的iOS 5和iOS 6.