iOS status bar

I know there are several ways of doing this. I’ve tried using the sharedApplication statusBarStyle method as well with no success.

Can anyone confirm if this is correct or not? thanks.

plist file imported to IDE.

<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>

What is it supposed to do ?

Looks like it controls the status bar at the top (where time, signal strength etc is)
It can be Black, White or invisible

in swift you control this in the Viewcontroller like this

  override func preferredStatusBarStyle() -> UIStatusBarStyle { return UIStatusBarStyle.LightContent    }

I am looking now for how to hide status bar only on some of my views within the same app.

This is what I use in my plist file for hiding the status bar for the whole app.

<key>UIStatusBarHidden</key> <true/> <key>UIViewControllerBasedStatusBarAppearance</key> <false/>

Not sure you can… in ObjC/Swift this can be done in the “prefersStatusBarHidden” routine of the UIViewController… just return true/false depending on what subview is active

There was already a thread about the same topic, with seemingly mixed results https://forum.xojo.com/18639-hide-statusbar

Anybody ever come up with a good means to do this just on certain views. Need a full screen portion to my app, but want to provide that status info on my configuration page.