Search code examples
iossplash-screenlaunch

Abandon image cassetts for LaunchScreen.storyboard


So I have a fairly old app, last time worked on before iPhone X(s) was released. Always used Launch Images Source instead of Launch Screen File as seen below.

enter image description here

I am now having issues launching on iPhone X, as the screen size is assumed from the LaunchImage and there is NO launch image currently provided for iPhone X(s) in the "LaunchImage" file of .xcassets folder.

What is the most straightforward way to abandon using cassets in use of the new "Launch Screen File"? I have already tried creating this and using it, but had no luck getting an UIImageView to resize an image with said screen sizes on devices.

Im really looking for a straightforward guide for creating a LaunchImage.storyboard file that can adapt a launch screen image(full-sized image) to any device size.


Solution

  • What is the most straightforward way to abandon using cassets in use of the new "Launch Screen File"?

    Change the Launch Images Source pop-up menu to "Don't use asset catalogs".

    enter image description here

    Make a LaunchScreen.storyboard if there isn't one, and point Launch Screen File at it. Make sure your launch image storyboard uses autolayout and is designated as a launch screen.

    enter image description here

    Now configure your storyboard's view controller using autolayout so that it lays out correctly on all devices.