23

I am creating an App for IOS7 for both retina 4inch and 3.5 inch, when my target version is IOS7 every thing wrks fine. But when i set the version below 6.1 then there is a white space at the top and bottom bar. when i run it in IOS6.1 Simulator 4inch i get something like this. I have the Default-568h@2x.png for IOS6.1 and prior also in place. I am using Xcode 5DP

enter image description here

Screen shot when app has target version 7 enter image description here

Any help will be appreciated

Rohit
  • 1,001
  • 1
  • 11
  • 20
  • Try these solutions http://stackoverflow.com/questions/18737186/position-of-navigation-bar-for-model-view-ios7/18753695#18753695 – DogCoffee Sep 17 '13 at 09:01
  • 1
    @Smick, that's not the problem; O' cool is running into good old fashioned ***letterboxing***. And [the solution for the problem has been answered here before](http://stackoverflow.com/questions/12404699/how-iphone-5-ios6-will-decide-if-an-app-must-be-run-in-letterbox-mode). Since "`Default-568h@2x.png`" appears to already exist, what happens when you clean the app off the iOS 6.X simulator and/or clean & rebuild and try it? – Michael Dautermann Sep 17 '13 at 09:02
  • yes @MichaelDautermann right name is not only enough that size of image must be *1136x640* with Default-568h@2x – Nitin Gohel Sep 17 '13 at 09:06
  • Use Autolayout I hope this might help you. – Pranav Bhardwaj Sep 17 '13 at 09:24
  • i tried to clean rebuild but with no luck @ pranav cannot use auto layout because i have handled a lot in code – Rohit Sep 17 '13 at 09:25
  • @MichaelDautermann cheers - thats a new problem to me... glad I haven't come across it all the same :-) – DogCoffee Sep 17 '13 at 09:29
  • Check this link: http://stackoverflow.com/questions/18913105/black-bars-showing-when-running-app-on-ios-7-4-inch-retina-display Solve this problem for me. – Irfan Gul Jan 16 '14 at 11:46
  • thank you @0' cool. you asked this question and really saved my time :) – Erhan Demirci Feb 09 '14 at 12:56
  • I had the same problem and I found that I unlinked the assets folder by mistake from the project. Luckily it was not deleted so I just added it to the project folder again and it was fine. Try that! – CSawy Jul 28 '14 at 12:39

5 Answers5

31

To solve this issue you have to specifically add background images for iOS 6, Follow following steps to add this using new xCode.

1) Add new image set from asset catalog and name it "Default" image set

2) Right click on that asset catalog image.

3) Choose iPhone, Retina 4 - inch from options like following

enter image description here

4) Add images in sequence with resolutions

  1. 320 * 480

  2. 640 * 960

  3. 640 * 1136

5) Clean your project

6) Run your project

imDeveloper
  • 804
  • 1
  • 8
  • 16
  • 3
    As a complement, sometimes it doesn't even work after you clean the project. You have to play with the Deployment Target settings further(like switching it to a different version). This happens especially in xcode6 from my point of view. – inexcii Oct 06 '14 at 14:49
11

1.First add the add the iPhone Retina(4-inch) and Retina(3.5-inch) images as a launch images..

Add a splash image named Default-568h@2x.png. This will identify your app that one supports iPhone 5 metrics

Brett Schneider
  • 3,993
  • 2
  • 16
  • 33
ggg_1120
  • 398
  • 2
  • 19
6

In Xcode 7 Beta 6 The Solution is,

Select your Project on the left>>In General Settings
Under "App Icons and Launch Images" In "Launch Screen File" select main.storyboard

enter image description here

This should fix the issue.

Anand Mohanty
  • 161
  • 2
  • 5
1

I was getting a warning "Missing Retina 4-inch launch image" clicked on it and XCode asked to add image itself to me. Clicked Add and it worked.

Haris
  • 1,822
  • 2
  • 22
  • 44
0

I can not add my solution as comment. so writing here.

I was facing the same issue. Root cause was Images.xcassets folder. This image folder got corrupted. Solution. Delete existing "Images.xcassets". Create new black project and drag the Images.xcassets from new projects to existing project.

If anyone facing this issue. Try this at least once.

deepax11
  • 199
  • 3
  • 7