2012-12-23 127 views
1

我在StoryBoard中有初始視圖中的UISplitViewController,我希望應用程序只能在橫向模式下工作。iOS 5中的iPad定位問題

我限制了風景的取向,甚至把plist初始界面方向設置爲風景(右側主頁按鈕)。

在iOS 6中一切正常,只顯示主視圖和詳細視圖,但在iOS 5中,它被卡在肖像模式下,只顯示細節視圖。

請幫助我,我堅持與它過去的2小時... ...

回答

6

你需要實現你已經包含在UISplitViewController視圖控制器shouldAutorotateToInterfaceOrientation

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation { 
    return UIInterfaceOrientationIsLandscape(toInterfaceOrientation); 
} 
+0

謝謝!!!!!! – 1337code