title: How to updated a deprecated statusBarStyle from iOS 9
body: <p>I'm updating an iOS app for iOS 12 and ran into this warning.</p>
  
  <p>I'm changing the status bar in the AppDelegate.swift file for my app. This can be found in the didFinishLaunchingWithOptions function</p>
  
  <pre><code>UIApplication.shared.statusBarStyle = UIStatusBarStyle.lightContent
  </code></pre>
  
  <p>I'm getting a warning that says this:</p>
  
  <blockquote>
    <p>Setter for 'statusBarStyle' was deprecated in iOS 9.0: Use
    -[UIViewController preferredStatusBarStyle]</p>
  </blockquote>
  
  <p>I thought this would be an easy update, but I haven't found an update that has worked for me.</p>
  
  <p>I tried setting this on the main VC:</p>
  
  <pre><code>// set the status bar color
  override var preferredStatusBarStyle : UIStatusBarStyle {
      return .lightContent
  }
  </code></pre>
  
  <p>But it's not displaying in light mode.</p>
  
  <p>When I try and type the override out myself, this is what I get for code hinting.</p>