I created a single view test app and tried running it on my iPhone 5 with iOS 7 installed. It looks like the screen is set to the iPhone 4 size and black bars appear above and below the view controller. I just created the project with Xcode 6 and tried running it without touching any other settings. Has anybody else seen this?
Downloading and updating Xcode The current release of Xcode is available as a free download from the Mac App Store.
Xcode is Apple's IDE, made for producing software on Mac for use on iOS, iPadOS, macOS, tvOS, and watchOS. Free to download and use, the IDE is chiefly used by developers to create iPhone and iPad apps, as well as programs for the Mac.
Xcode only runs on a mac.
In order to solve this problem you have to create launch-screen images for the devices your app supports.
When starting a new app:
For instance let's say your app supports iPhones > 4s, so iPhone: 4s, 5, 5s, 6 and 6plus.
Make sure to make launch-images which have the following dimensions:
For more info about iOS screen dimensions, see this helpful chart
Select your project and then the general settings:
Select or make launch screens in the general section when clicked on your project.
And then make sure you add or select an Launch-image asset:
Go to images.xcassets and select LaunchImage at the left, then select the devices your app supports (at the right)
Make sure you put your images on the right spot, you can select the dashed square and see in the attributes inspector (right section on screen) what dimensions your image needs to meet.
Now when simulating your app all black bars have disappeared.
You need to add a [email protected] launch image. Here is one that I found by googling (I didn't create it and take no credit for it): https://jira.appcelerator.org/secure/attachment/31241/[email protected]
If you want to create your own image its dimensions have to be 640 × 1136. Since you did no customizing the filename should be "[email protected]".
For some reason, the default LaunchScreen.xib that comes with a new project on Xcode 6.1 is 480x480, while the standard .xib file size for auto layout and adaptive layout appears to be 600x600. If you set the LaunchScreen.xib view size to 600x600, it should fix the problem, did for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With