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:
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:
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
Ios Uiimagepickercontroller Result Image Orientation After Upload
Nsurlsession/Nsurlconnection Http Load Failed on iOS 9
Uiview With Rounded Corners and Drop Shadow
Can You Build Dynamic Libraries For iOS and Load Them At Runtime
How to Count Occurrences of an Element in a Swift Array
Detecting Taps on Attributed Text in a Uitextview in Ios
Openurl Not Work in Action Extension
How to Create a Button Programmatically
How to Enable Native Resolution For Apps on Iphone 6 and 6 Plus
Ios: How to Store Username/Password Within an App
Getting Current Device Language in Ios
Programmatically Retrieve Memory Usage on Iphone
How Does a Delegate Work in Objective-C
Uilabel Sizetofit Doesn't Work With Autolayout Ios6