3

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. enter image description here

enter image description here

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.

enter image description here

When selecting an device with a larger screensize, e.g. 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.

enter image description here

pcvnes
  • 927
  • 2
  • 15
  • 41
  • Is your app set up for Landscape orientations under Target -> Deployment Info -> Device Orientations? – JAL Apr 25 '16 at 20:38
  • Yes, otherwise the landscape orientations would not work on all other devices with screen sizes larger than the iPhone 6s – pcvnes Apr 25 '16 at 20:42
  • I'm new to iOS and swift but just looking at the images... would the image + title and copyright fit in a landscape view of iPhone6 size or less. Does the app resize the image so that all element will fit? Or does it decide that the elements will not fit rotated so it does not rotate? – Mych Apr 25 '16 at 20:47
  • When resizing the image to a fixed size of 50, it should even fit on the smallest devices. Also when validating the constrains in the interface builder, after setting the simulated metrics to an iPhone 4.7-inch and Orientation landscape. The constraints seems to be ok. – pcvnes Apr 25 '16 at 21:31
  • @pcvnes understand... nice graphic btw. – Mych Apr 26 '16 at 07:50

1 Answers1

-1

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.

Erik Allen
  • 1,841
  • 2
  • 20
  • 36
  • This comment is about the Main storyboard and corresponding controller. The launchscreen is rotated on all devices except iPhones 6 and smaller. Also the icons on the iPhone 6 and smaller do not rotated as shown in the screenshots. – pcvnes Apr 29 '16 at 13:05