Ios 9 Xcode 7 - Application Appears With Black Bars on Top and Bottom

iOS 9 Xcode 7 - Application appears with black bars on top and bottom

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)

iOS9 App has black bars on top and bottom

@Fantina @Goles I was able to temporarily fix this by creating and adding a Default-568h@2x.png file with resolution 640x1136. I then updated the 'App Icons and Launch Images' Section to look like this:

No Image Source or Launch Screen File

I don't think this is a long term solution because in order to be compliant with iOS9 and split-screen apps, Apple is requiring storyboard or xib files. This makes it difficult for developers who rely solely on programatic view generation/layout. URGH.

Seeing black bars at the top and bottom of the iPhone X Simulator

When using launch images (instead of the much easier Launch screen file), you need to provide the properly sized launch image for each device size you wish to support. Once you add the additional launch image, your app should take advantage of the new screen size.

The new iPhone X requires a launch image sized at 1125px × 2436px which is a 3x image for 375pt × 812pt.

Of course if you switch over to using a Launch screen file instead of individual launch images, your app will automatically adapt to all device sizes without any additional work.

Xcode iOS simulator displays black borders on top and bottom of views

The Game template does not include a LaunchScreen.storyboard -- no idea why.

If you add one to your project and set it in the project settings:

Sample Image

You'll have a full-screen view as expected.

found black space on top and bottom Xcode

Include Default images e.g Default.png,Default-568.png etc for all resolutions.This happens when app cannot find default image.



Related Topics



Leave a reply



Submit