Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

App height incorrect after upgrading to iOS9 & Xcode 7 [duplicate]

Tags:

ios

ios9

xcode7

Installed the app on iPhone 6 iOS9 and here is what happened. Notice black bars on top and bottom. It works just fine on iOS8. How I can fix it?

I've tried building with Xcode 6.4 & 7. Same result.

(iPhone 5 used to run iPhone 4 apps like this)

enter image description here

like image 836
Mojtaba Avatar asked Dec 03 '25 16:12

Mojtaba


2 Answers

Did you migrate your app from an earlier version of Xcode? If so then Xcode is now making an assumption about your screen size and you need a way of indicating the actual screen size at run time.

There are two ways:

a) If you use a launch screen.

You are missing a LaunchScreen.storyboard file. Create a Launch Screen object from the New File... dialog

launch screen creation

b) If you don't use a launch screen.

Go to your Target's settings and choose General, then App Icons and Launch Images. Now set "Launch Screen File" to your "main.storyboard" (or another storyboard if appropriate)

like image 98
Gruntcakes Avatar answered Dec 06 '25 06:12

Gruntcakes


My App does not use a launch image. Setting the "Launch Screen File" to my "main.storyboard" file fixed the issue for me.

This setting can be found under "Target->General->App Icons and Launch Images"

Use the following link for more information: http://oleb.net/blog/2014/08/replacing-launch-images-with-storyboards/

like image 38
dreamer.psp Avatar answered Dec 06 '25 05:12

dreamer.psp



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!