Seeing black bars at the top and bottom of the iPhone X Simulator

前端 未结 10 1135
独厮守ぢ
独厮守ぢ 2020-11-22 14:32

Running my App in the iPhone X Simulator (GM Seed) I am noticing two strange effects:

  • the App does not use the full screen space (top and bottom area is black)
相关标签:
10条回答
  • 2020-11-22 14:44

    You may check in project target launch screen file is not set to empty if it is empty it may cause problem.

    0 讨论(0)
  • 2020-11-22 14:48

    I have figured out how to fix (though I still don't understand why this happened only on iPhone X) LaunchScreen storyboard on iPhone X with seeing black top&bottom bars.

    I have LaunchScreen storyboard with one UIImageView.

    UIImageView's top&bottom has to be pinned to SuperView's top&bottom. NOT to SafeArea.

    0 讨论(0)
  • 2020-11-22 14:48

    if you removed LaunchScreen.storyboard; Choose your project, select your project target, General -> App Icons and Launch Images -> Launch Screen File: Select here Main.storyboard instead of LaunchScreen.storyboard

    0 讨论(0)
  • 2020-11-22 14:49

    I fixed it by simply inserting some random text in the Lanch Screen File textfield. I dont even have a Launch Screen File... XCode is so buggy.

    update

    Although this fixes it in simulator (still very weird and unexpected) when uploading a binary to iTunes Connect it will fail due to not finding a LanchScreen file of name "random-name"

    0 讨论(0)
  • 2020-11-22 14:50

    Just ran into this while trying to update an app I hadn't worked on in a while.

    On Xcode 9.4, I was able to fix this by doing the following:

    1. Add a launch screen by going to File -> New -> File... -> Launch Screen

    1. Make sure the newly added launch screen storyboard is selected as the launch screen file under project settings.

    0 讨论(0)
  • 2020-11-22 14:58

    If you already have a 1125px × 2436px launch image but the app is still not using the full screen check to make sure that your image is PNG.

    0 讨论(0)
提交回复
热议问题