1

我在 StoryBoard 中有 UISplitViewController 是初始视图,我希望该应用程序仅在横向模式下工作。

我只将方向限制为横向,甚至将 plist 初始界面方向设置为横向(右主页按钮)。

在 iOS 6 中一切正常,它只显示主视图和细节视图,但在 iOS 5 中,它卡在纵向模式,只显示细节视图。

请帮我解决这个问题,我在过去的两个小时里都坚持了下来......

4

1 回答 1

6

您需要shouldAutorotateToInterfaceOrientation在包含在以下内容中的视图控制器中实现UISplitViewController

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
    return UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
}
于 2012-12-23T16:49:01.677 回答