简体   繁体   中英

Status Bar Disappeared on XR (Swift)

The status bar has disappeared on some viewControllers! The "ears" around the notch, and some space below, are now covered with a sold black bar.

I am using a UITabBarController with 4 viewControllers - the status bar appears on two of them, but not the other two.

It just began happening, and occurs in both portrait and landscape. What might be causing this? What might I have done? (Xcode 10.1, XR simulator)

在此处输入图片说明

在此处输入图片说明

I accidentally changed the background color to .clear by un-commenting it in the VC's class:

    //backgroundColor = .red
    backgroundColor = .blue
    backgroundColor = .clear

Which also explains why it happened in two of the viewControllers (the two that use that class).

Though I am not sure why .clear makes the status bar black...

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