Xcode 6 storyboard screen size wrong in iPhone5s(iOS 7) but not (iOS 8)
Solution 1
In new Xcode 6 projects, you don't have these [email protected] images.
Do the next steps to fix it:
1) Open your Images.xcassets and look for LaunchImage. It is probably missing.
2) In this case, click on + (located at the bottom) and click on New Launch Image.
3) Select your project target and open Build Settings tab. Look for "Asset Catalog Compiler - Options" section and then "Asset Catalog Launch Image Set Name", if it is empty type LaunchImage.
Voila!
Solution 2
Try using [email protected] image as splash.
Solution 3
Project Properties -> General -> App Icons and Launch Images -> Click (Use Asset Catalog)
Pop-up -> Click (Migrate)
Delete (Launch Screen File)
Finish!!!
Solution 4
In Xcode 7, make sure in addition to what's been said about adding a LaunchImage you also add this entry in the plist file:
Solution 5
I was facing this problem in XCode8. I figured it out that Launch Screen File was not set.
Go to : project Properties -> General -> App Icons and Launch Images
Click on drop down and select Main.storyboard.
Related videos on Youtube
Comments
-
saranpol almost 2 years
I created a new project with xcode 6.0.1 using swift and set deployment target to iOS 7.0.
The screen size is wrong for iPhone 5s in iOS7 - it shouldn't have any black spaces.
-
jomafer over 9 yearssaranpol would you mind to change the accepted answer in order to help the users? thanks!
-
-
marsant over 9 yearsYes, this is the right trick to do. The only thing is, in Xcode 6, I did not see the file auto generated as before. I had to manually copy the Default-568h@2x from some old project.
-
Shial over 9 yearsThis one should be the corect answear
-
Avis over 9 yearsthanks for your answer..whats the reason behind this,.please and thanks..!
-
Armanoide over 9 yearsfollow this step it works for me with Xcode 6.1.1, thanks @EralpB
-
Aнгел over 9 yearsanother solution is to set the "Launch Screen File" in project target -> General -> App icons and launch images
-
user3741598 over 7 yearsThanks for sharing this - so easy - but I was overlooking it. I tried to add a splash screen - wouldn't work and when I deleted all references, when I would do a build my view was distorted and not all the objects were showing - even after a restore from the previous day's backup. Used your suggestion - back to normal. Sad how complicated Apple makes what should be an easy feature to add - and keeps changing it from one Xcode version to the next. Not everyone sits in front of Xcode 6 days a week...