iOS 9 Xcode 7 - Application appears with black bars on top and bottom

后端 未结 14 1613
野趣味
野趣味 2020-11-22 11:31

Installed the app on iPhone 6 iOS9 and here is what happened. Notice black bars on top and bottom. It works just fine on iOS8. How I can fix it?

I\'ve tried building

14条回答
  •  说谎
    说谎 (楼主)
    2020-11-22 12:06

    When you migrate your app from earlier version of xCode to xCode 6 or xCode 7, you will face this issue.

    For iOS 7 and earlier, developers need to provide separate launch images for all screen sizes, resolutions and orientations their app supported.

    In Xcode 6 or later, there is another option. You can specify a storyboard whose initial view controller will then be used as the app’s launch screen. Use below steps:

    • Create a blank storyboard file named LaunchScreen.storyboard.

    • Go to your target settings and, on the "General" tab, select the storyboard as your Launch Screen File in "App Icons and Launch Images" section. Xcode will add a corresponding UILaunchStoryboardName key to your app’s Info.plist. When this key is present, Xcode will prioritize it over any launch images you might have set.

    • Add some subviews to newly created storyboard's view and position them with constraints. When you launch the app on a device, the OS should use the scene as the launch screen.

    Delete the older app from simulator and clean the project.

    Cheers :-)

提交回复
热议问题