How to Add Iphonex Launch Image

How to Add iPhoneX Launch Image

Using Xcode Version 9.1 (9B55), thanks to the answers above (especially Stoull), however my experience is slightly different. My original question was basically: "How to get launch image (in storyboard or LaunchImage) which matches the bg of the first game scene without a rescaling blip on all resolutions?"

I have resolved this and it works using LaunchImage. However, there are complications.

Add a LaunchImage to the Assets folder, then specify it in the project settings:

Sample Image

Then you would expect to do this:

Sample Image

resulting in:

Sample Image

BUT on Build you get the warning:

Sample Image

so you need this for the LaunchImage:

Sample Image

resulting in:

Sample Image

and there is no warning.... and LaunchImage works on all iPhones/iPads.

The image sizes are:

iPhoneX (iPhone X Landscape iOS 11+) : 2436 x 1125

Retina HD 5.5" (iPhone Landscape iOS 8,9) : 2208 x 1242

2x (iPhone Portrait iOS 7-9) : 640 x 960

Retina4 (iPhone Portrait iOS 7-9) : 640 x 1136

1x (iPad Landscape iOS 7-9) : 1024 x 768

2x (iPad Landscape iOS 7-9) : 2048 x 1536

The system is clearly messy and needs a proper revamp by Apple.

Launch Image names of iPhoneX?

You can add static launch image for iPhone X, only add:
Default-375w-812h@3x.png

How can I add a fullscreen image for iPhone X to xcassets (not a launch image)?

You cannot have images with different aspect ratios in one image asset. You should add a different asset if you want to target the iPhone X specifically. Give it a suffix to distinguish it from the original image (for e.g. "-x").

Two Different Launch Screens Shown for on iPhone X on Initialization

Okay so the first launch image display is the one displayed by the system, and the second is the one displayed by the splashscreen plugin. The issue was solved by updating to cordova-plugin-splashscreen v5.0.2, which contains the bug fix.

Aspect Ratio of Background Image for iPhone X

Rather than use an image as your launch screen, you should try using a launch storyboard.

This could contain a single view controller that contains a UIImageView, with contentMode = .aspectFill. This will clip some of the image on either side, but this might be acceptable to you.

LaunchScreen.storyboard not taking full height on iPhone X

No matter what I tried it would not update. I eventually ended up simply reinstalling xcode 10.1 and it fixed itself. I think something got mixed up because I had 3 versions of xcode installed.



Related Topics



Leave a reply



Submit