技术说明TN2244:在横向状态下启动iPhone应用程序:
UISupportedInterfaceOrientations键的值确定应用程序启动时状态栏的位置.在iOS 7及更低版本中,如果存在UIInterfaceOrientationPortrait值,则状态栏将始终定位为纵向.否则,状态栏将根据UISupportedInterfaceOrientations键下显示的第一个方向定位.
因此,在iOS 8中,UIInterfaceOrientationLandscape首先放入UISupportedInterfaceOrientations列表以让您的应用程序在Landscape中启动是完全可以的.
它在iOS 9中不再起作用.UIInterfaceOrientationPortrait在任何位置的列表中强制应用程序以肖像开始.
题
有没有已知的解决方法?我需要我的应用程序从Landscape开始.
注意:使用viewControllers的supportedInterfaceOrientations()方法不是一个选项,因为它在呈现LaunchScreen后生效.