title: prefersStatusBarHidden slide animation not working on device
body: <p>I have two view controllers. MainViewController and SecondViewController (this one is embedded in a Navigation Controller).
  MainViewController has a UIButton that will modally present SecondViewController, while SecondViewController has a UIButton that will dismiss itself.</p>
  
  <p>Each of them have the following code:</p>
  
  <pre><code>var statusBarHidden = false {
      didSet {
          UIView.animate(withDuration: 0.5) { () -&gt; Void in
              self.setNeedsStatusBarAppearanceUpdate()
          }
      }
  }
  
  override var prefersStatusBarHidden: Bool {
      return statusBarHidden
  }
  
  override var preferredStatusBarUpdateAnimation: UIStatusBarAnimation {
      return .slide
  }
  
  override func viewWillAppear(_ animated: Bool) {
      super.viewWillAppear(animated)
  
      statusBarHidden = true
  }
  </code></pre>
  
  <p>The slide animation of the status bar works great in the simulator but not on the actual device, what am i doing wrong ?</p>
  
  <p>I'm using xCode 8.2.1 and Swift 3</p>