2
votes

I created a new project in XCode 5. And I run it on iPhone 5 (which has 4" screen) and a view doesn't cover all screen, but rather squeezed in 3.5" box (there are two black bars around my view)

I went to Main_iPhone.storyboard and checked that:

  • Use Autolayout is turned on on View Contoller
  • Use Autolayout is turned on on View
  • I tried Simulated Metrics, Size: Retina 4-inch Full Screen, Freeform and Inferred.
  • I tried to use button at the button to switch to Retina 4-inch form factor and 3.5-inch form factor.

Nothing makes a difference and it still shown as 3.5" (black bars around my view).

How can I make sure that iPhone storyboard occupies whole screen on iPhone 4-inch phone?

Update 1

None of solutions in this question: Xcode Storyboard displaying the new iPhone 5 screen size? solved my problem. BTW. That question was for pre XCode 5.

2
@DanMorrow: None of these solution helped me.Victor Ronin
Is your problem that the Storyboard is not shown for 4" screen (so in InterfaceBuilder) or that the UI is shown with the black bars when running the App on an iPhone 5?Nero
@Nero: It's shown with black bars when running on iPhone 5.Victor Ronin
Did you add an -568h@2x launch image? To check look at [App target] > General > Launch images > Retina 4-inchNero

2 Answers

6
votes

To enable your apps to work with iPhone 5, I suggest you to do two things.

First you need to add a retina version of the launcher image. It should be named [email protected].

And second use Auto Layout and make sure you have your autoresizing mask set up correctly for all your views.

0
votes

I had the same problem, could not resolve it by any of the above methods. So what I did is copied the Content.json files from old project (where 4-inch was working) into the Images.xcassets Applcon.appiconset and LaunchImage.launchimage directories respectively. Then selected in the project setting in General under App Icon selected Source as AppIcon and in Launch Images in Source selected LaunchImage. It worked. Maybe useful to someone.