iOS9 App has black bars on top and bottom

半世苍凉 提交于 2019-11-28 08:14:49

@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.

I had exactly the same issue, and this is weird, I've solved the error and I don't really know why my solution do the trick.

Add a Launch Screen File to your project (I've copied one from another newer project I have), and that's all, the app now uses all the screen again.

To add a Launch Screen File first create a xib file, use a UIView and fill with whatever you want.

Then you have to select the project in the left side of the screen, select the app target (not the project one), on the general tab search for App Icons and Launch Images and put the xib name you just created on Launch Screen File.

The problem with this, is that this activates the Size classes in the app interface, so you have to review your app's interface because scaling is no longer working.

PS: I'm using Xcode 7.0 GM

I had a similar problem and I've solved it by setting up Main.storyboard as Launch Screen File in App Configuration Screen. It made all screens fit the entire screen.

You can add a LaunchScreen storyboard by : File/New/File..., and then in the iOS group, select UserInterface/Launch Screen.

Then select it as the Launch Screen for your app, as explained in the answer given by Fantini. That's with Xcode 7.0

I ran into this after upgrading to xcode 9. Interestingly the app looked fine when running on simulators but showed a black bar at the bottom when running on a connected device. In the menu choosing product and then holding Option -> clean build folder fixed the issue for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!