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:
Then you would expect to do this:
resulting in:
BUT on Build you get the warning:
so you need this for the LaunchImage:
resulting in:
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
Using Existing System Sounds in iOS App [Swift|
Add Uipickerview in Uiactionsheet from iOS 8 Not Working
iOS - Delayed "Touch Down" Event for Uibutton in Uitableviewcell
Tap on a Part of Text of Uilabel
Swift: How to Refresh Uicollectionview Layout After Rotation of the Device
Converting Utc Date Format to Local Nsdate
Cropping Image with Swift and Put It on Center Position
The Maximum Number of Apps for Free Development Profiles Has Been Reached. Xcode 11.5
Default Tab Bar Item Colors Using Swift Xcode 6
Missing Push Notification Entitlement Warning
Nsinteger and Nsuinteger in a Mixed 64Bit/32Bit Environment
Storyboards VS. the Old Xib Way
How to Pass Data from One Container to Another, Both Embedded in the Same Uiviewcontroller in Swift
Count Unseen Messages with Firebase in Swift
Autolayout - Intrinsic Size of Uibutton Does Not Include Title Insets