iOS set statusbar white, and hide in another ViewController <p>I need a white status bar for my main initial ViewController, but also be able to hide it in another ViewController. I can do one or the other, but not both at the same time. Any suggestions?</p> <p>I set it to white by setting </p> <blockquote> <p>View controller-based status bar appearance key to NO in the Info.plist</p> </blockquote> <pre><code>override func preferredStatusBarStyle() -&gt; UIStatusBarStyle { return .LightContent } </code></pre> <hr> <p>And to hide it (on another ViewController presented modally) I do,</p> <pre><code>override func prefersStatusBarHidden() -&gt; Bool { return statusBarHidden } </code></pre> <p><strong>however it won't hide unless</strong> I remove the key I previously added to the Info.plist, but if I remove the key, then the status bar goes back to black.</p> <hr> <p>EDIT-MY Solution: The View controller classes were not working in my case because I have the main view controller embedded in a navigation controller, my fix was to override the same methods but for the navigation controller instead of the view controller in question.</p> <pre><code>extension UINavigationController { public override func preferredStatusBarStyle() -&gt; UIStatusBarStyle { return .LightContent } } </code></pre>