gpt4 book ai didi

iphone - iOS 5 中的 iPad 方向问题

转载 作者:行者123 更新时间:2023-12-01 17:42:47 24 4
gpt4 key购买 nike

我在 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com