简体   繁体   中英

Black status bar on the iPad Pro with rounded corners

My app always runs in compatibility mode on the new iPad Pro Simulator. I've installed the latest Xcode 10.1. I've verified it is linked against the latest iOS 12.1. When I run it on an iPhone XS, it correctly uses Safe area insets. Yet it shows a black status bar and a black stripe at the bottom where the Home indicator is located.

Even when I create a sample app with Xcode 10.1 and run it on the iPad Pro Simulator, it is launched in compatibility mode:

iPad Pro上兼容模式下的Sampe应用

How to make the app use the whole screen?

I was seeing the same issue simply by creating a fresh iOS app using the Single View app or the Master-Detail app templates.

I got it working as expected by doing the following:

I deleted all versions of Xcode installed on my computer. I went to my ~/Library/Developer/Xcode folder and I deleted the following:

  • All files named DeveloperPortal*
  • The DerivedData folder
  • The Installs folder (which just had some empty folders in it)
  • Under UserData/IB Support I deleted the Simulator Devices folder

Then I did a fresh download and install of Xcode 10.1 from the App Store.

After that, a clean build of the test app worked as expected. I don't know which of the above steps was really needed but I got it working.

I tried the above answer and it did not fix my problem. I did fix my problem by setting a .storyboard file as my Launch Screen File in Project->Target->General. Previously, I had been using Launch Images for my splash screen.

This is mentioned in the "Optimizing Your UI" section here: https://developer.apple.com/ipad/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM