Launch screen.storyboard for Portrait and Landscape vs split screen
Asked Answered
F

1

15

I have to implement split screen functionality for the new iPad and I got a workaround from Apple's doc to support the same in my app: https://developer.apple.com/library/prerelease/ios/documentation/WindowsViews/Conceptual/AdoptingMultitaskingOniPad/QuickStartForSlideOverAndSplitView.html#//apple_ref/doc/uid/TP40015145-CH13-SW1

In this doc, check the 2nd point:

Provide a LaunchScreen.storyboard file (instead of a .png image file as you did in iOS 7 and earlier)

This is why I have to use Launch screen.storyboard. Now, the split over works perfect but for my app I have separate Launch screens, Default-Portrait and Default-Landscape. But now I have taken storyboard, I am unable to customise launch screens for different orientations. And even I can't code for the same in Launch screen or it gives me error.

Further, I have tried using size classes to provide separate imageviews for both orientations but I got no success.

It would be great help if anyone suggests me how to implement Launch screen.storyboard for Landscape and Portrait with different images.

Landscape Portrait

Flournoy answered 14/10, 2015 at 13:6 Comment(4)
just left the task and used old way.Flournoy
I am facing same issue. :(Saving
You can add a new question for this as my question seems very old and no one is responding.Flournoy
@PareshThakor Given how old your question is I doubt the answer matter now, but I believe this one should work if anyone goes looking for a solution.Allaround
A
0

You can add a UIImage to your launch screen. Once you've done that and set the constraints to fill the width and height then add an image to your asset catalogue.

On the properties of the image within the catalogue set the 'width class' and 'height class' to 'Any & compact'. Then you'll have spaces for images for Any and compact height (landscape) and Any and compact width (portrait). The just put your artwork in to the appropriate artwork placeholders and use that image on your storyboard.

I believe that will then choose the appropriate artwork for you depending on how the device is held when the app launches.

Allaround answered 28/11, 2017 at 16:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.