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
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:
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:
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
Firebase Custom Event Parameters Not Visible in Console
Nsattributedstring Click Event in Uilabel Using Swift
Undefined Symbols For Architecture Armv7
How to Return Value from Alamofire
How to Take a Screen Shot of a Uiview
Sending an Http Post Request on Ios
Move View With Keyboard Using Swift
Background Location Services Not Working in iOS 7
How to Find Out the Type of an Object (In Swift)
How to Get My Ip Address Programmatically on Ios/Macos
How to Create a Custom Pop Up View With Swift
Ios Swift - Objective C Code Migration to Swift
How to Size a Uitextview to Its Content
How to Add Nsapptransportsecurity to My Info.Plist File