title: Updating the status bar style between view controllers
body: <p>In my <code>info.plist</code>, file I have <code>View controller-based status bar appearance</code> set to <code>YES</code></p>
  
  <p>I have a <code>FirstViewController</code> where the status bar is hidden.</p>
  
  <p>In my <code>SecondViewController</code> I have</p>
  
  <pre><code>override var preferredStatusBarStyle: UIStatusBarStyle {
      return .lightContent
  }
  
  override var prefersStatusBarHidden: Bool {
      return false
  }
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      setNeedsStatusBarAppearanceUpdate()
  }
  </code></pre>
  
  <p>However, the status bar is showing up, but is black.</p>
  
  <p>How can I get it to update correctly? Thanks</p>
  
  <p>Edit:</p>
  
  <p><code>AppDelegate.swift</code> also has this</p>
  
  <p><code>UIApplication.shared.statusBarStyle = .lightContent</code> in <code>didFinishLaunchingWithOptions</code></p>