我在 StoryBoard 中有 UISplitViewController 是初始 View ,我希望该应用程序仅在横向模式下工作。
我只将方向限制为横向,甚至将 plist 初始界面方向设置为横向(右主页按钮)。
在 iOS 6 中一切正常,它只显示主视图和细节 View ,但在 iOS 5 中,它卡在纵向模式,只显示细节 View 。
请帮我解决这个问题,我在过去的两个小时里都坚持了下来......
最佳答案
您需要执行 shouldAutorotateToInterfaceOrientation
在您包含在 UISplitViewController
中的 View Controller 中:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
return UIInterfaceOrientationIsLandscape(toInterfaceOrientation);
}
关于iphone - iOS 5 中的 iPad 方向问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14012474/