Seeing Black Bars At the Top and Bottom of the Iphone X Simulator

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 10 - iPhone X black bars

Thanks to rmaddy I changed from launch screen image to storyboard and the problem disappeared... how stupid of me to ignore that while googling.. :)

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.

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.



Related Topics



Leave a reply



Submit