【发布时间】:2015-10-22 14:21:59
【问题描述】:
Technical Note TN2244: Launching your iPhone Application in Landscape 状态:
UISupportedInterfaceOrientations 键的值决定了应用启动时状态栏的位置。在 iOS 7 及更低版本中,如果 UIInterfaceOrientationPortrait 值存在,状态栏将始终定位为纵向。否则,状态栏将根据 UISupportedInterfaceOrientations 键下出现的第一个方向定位。
因此,在 iOS 8 中,将 UIInterfaceOrientationLandscape 放在 UISupportedInterfaceOrientations 列表中的首位让您的应用程序以横向启动是非常好的。
它在 iOS 9 中不再起作用。在 any 位置的列表中包含 UIInterfaceOrientationPortrait 会强制应用以纵向启动。
问题
是否有已知的解决方法?我需要我的应用以横向模式启动。
注意:使用 viewControllers 的 supportedInterfaceOrientations() 方法不是一个选项,因为它会在 LaunchScreen 出现后生效。
【问题讨论】:
标签: ios iphone orientation ios9 uiinterfaceorientation