title: How do you change the colour of the status bar with a button?
body: <p>I'm trying to implement a button that changes the background of my app from white to black along with the colour of the status bar. Right now I have</p>
  
  <pre><code>@IBAction func buttonTapped(_ sender: Any) {
          self.view.backgroundColor = UIColor.black
          UIApplication.shared.statusBarStyle = .lightContent
  }
  </code></pre>
  
  <p>This doesn't seem to work. Does anyone know of a way of changing the colour of the status bar font without reloading the entire view?</p>