简体   繁体   中英

Launchscreen rotation not working on iPhone 6s and smaller screens

I have a launchscreen storyboard with an ImageView and two labels all with some constraints to align the objects relative to the size of the screen. 在此输入图像描述

在此输入图像描述

When i choose a device with a screensize of an iPhone 6s or smaller in the simulator and rotate the device in landscape mode the view is not rotated.

在此输入图像描述

When selecting an device with a larger screensize, eg an iPhone 6S Plus, the launchscreen is rotated correctly in landscape mode. Also when running it on an iPhone 6 the launchscreen is not rotated.

Any suggestions how to resolve this?

Maybe got a little bit closer to the cause. When rotating an iPhone 6 Plus or larger to the left in the Simulator, the dock icons are rotated. These are not rotated when rotating a device with a screen size equal or smaller than the iPhone 6.

在此输入图像描述

I do not believe it is possible to rotate the LaunchScreen.

On the Apple Developer site: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIViewController_Class/ in the section on " Handling View Rotations " there was this line:

At launch time, apps should always set up their interface in a portrait orientation. After the application:didFinishLaunchingWithOptions: method returns, the app uses the view controller rotation mechanism described above to rotate the views to the appropriate orientation prior to showing the window.

So it looks like your main storyboard will get invoked before orientation can be taken into account.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM