Orientation of the initial interface to the landscape of iOS 9

Technical Note TN2244: Launch iPhone app in landscape :

The UISupportedInterfaceOrientations key values โ€‹โ€‹determine how to position the status bar during application startup. In iOS 7 and below, if UIInterfaceOrientationPortrait is present, the status bar will always be positioned for portrait orientation. Otherwise, the status bar will be located in accordance with the first orientation, which is displayed under the key UISupportedInterfaceOrientations.

So, in iOS 8, it was ideal to insert UIInterfaceOrientationLandscapefirst into the list UISupportedInterfaceOrientationsso that your application starts in Landscape.

He no longer works for iOS 9. With UIInterfaceOrientationPortraitthe list in all , the position causes the application to run in the portrait.

Question

Is there a known workaround? I need an app to get started in Landscape.

Note. Using the viewControllers method is supportedInterfaceOrientations()not an option since it takes effect after the LaunchScreen view.

+4
source share
1 answer

The presence of a UIInterfaceOrientationPortrait in the list at any position causes the application to launch in Portrait.

- . , ! , , iOS 8. .

, . Info.plist . , .

application:supportedInterfaceOrientationsForWindow: , . , , .

, Info.plist , , application:supportedInterfaceOrientationsForWindow: , .

+2

Source: https://habr.com/ru/post/1612772/


All Articles