Xcode 6 storyboard screen size wrong in iPhone5s(iOS 7) but not (iOS 8)

13,118

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.

Images.xcassets

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.

Asset Catalog Compiler

Voila!

Solution 2

Try using [email protected] image as splash.

Default-568h@2x.png

Solution 3

  1. Project Properties -> General -> App Icons and Launch Images -> Click (Use Asset Catalog)

  2. Pop-up -> Click (Migrate)

  3. 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:

enter image description here

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.

enter image description here

Share:
13,118

Related videos on Youtube

saranpol
Author by

saranpol

Programmer

Updated on August 02, 2022

Comments

  • saranpol
    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.

    blacks spaces in iPhone 5S

    • jomafer
      jomafer over 9 years
      saranpol would you mind to change the accepted answer in order to help the users? thanks!
  • marsant
    marsant over 9 years
    Yes, 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
    Shial over 9 years
    This one should be the corect answear
  • Avis
    Avis over 9 years
    thanks for your answer..whats the reason behind this,.please and thanks..!
  • Armanoide
    Armanoide over 9 years
    follow this step it works for me with Xcode 6.1.1, thanks @EralpB
  • Aнгел
    Aнгел over 9 years
    another solution is to set the "Launch Screen File" in project target -> General -> App icons and launch images
  • user3741598
    user3741598 over 7 years
    Thanks 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...