3

I am trying to display Launchscreen storyboard in iPad Air 2 (iOS 9.0).

I have added ImageSet in xcassets and added images with 1X and 2X for iPad. enter image description here

And referred the ImageSet name in the Launchscreen.storyboard. enter image description here

I now notice that the Launchscreen displays properly when I open the app in portrait mode but NOT when I open the same app in Landscape mode.

How to solve this?

Image with Constraints enter image description here

RosAng
  • 1,010
  • 2
  • 18
  • 42
  • You should check your constraints, the orange lines means that the view is misplaced or that it's missing some constraints. – LorenzOliveto Feb 23 '16 at 10:54
  • That check did not help. – RosAng Feb 23 '16 at 11:08
  • Can you post an image with your constraints? – LorenzOliveto Feb 23 '16 at 11:23
  • added. Please find above. – RosAng Feb 23 '16 at 11:36
  • I can't get this to work either. At some point it did work, then it stopped working and I consistently get a white screen when I changed the image. Funny, the image I no longer want, which I named FirstScreen, I deleted. I deleted it from everything, assets, files, any reference to it in the source directories. I've even shutdown Xcode and trashed the entire ~/Library/..../Xcode/DerivedData directory. If I try any image, its white. If I type in FirstScreen, the Storyboard shows the blue "?", but surprise the image comes up. It's really nowhere to be found, but the image pops up. WTF?. – Dr. Polar Humenn Oct 05 '16 at 20:19

2 Answers2

0

I tried with a sample project and happened also to me.
Try to change the Devices settings in the image asset from iPad to Universal and add your images as 1x and 2x. In my project this solved the issue.

LorenzOliveto
  • 7,796
  • 1
  • 20
  • 47
  • What dimension of image will i put? if i put 1536 X 2048 px in portrait mode it opens GOOD but not in landscape. – RosAng Feb 23 '16 at 12:00
  • You can set two different images for the portrait and landscape version using Size Classes (https://developer.apple.com/library/ios/recipes/xcode_help-IB_adaptive_sizes/chapters/AboutAdaptiveSizeDesign.html) for the LaunchScreen Storyboard – LorenzOliveto Feb 23 '16 at 13:03
0

Try following steps:

(1) Set [Settings -> Deployment Info -> Devices] to [iPad]

(2) See if [Settings -> Deployment Info -> Device Orientation -> Landscace Left / Right] check box is off or not.

If one or both of them is/are off, that is the reason why the Lauchscreen is not displayed as landscape orientation. In this case, all that you have to do is just turn the check boxes on.

(3) Set [Settings -> Deployment Info -> Devices] back to what is before step (1).

The Settings Screen

Jun
  • 36
  • 4