title: Why does the status bar appear when popoverPresentationController is called in Swift?
body: <p>In my app you can tap a <code>UIButton</code> and a popover pops up and shows the Photo Library of the user. </p>
  
  <p>I am using this code to make that happen:</p>
  
  <pre><code>        let picker = UIImagePickerController()
          picker.allowsEditing = false
          picker.sourceType = .PhotoLibrary
          picker.modalPresentationStyle = .Popover
          self.presentViewController(picker, animated: true, completion: nil)
          picker.popoverPresentationController?.sourceRect = CGRectMake(600,180,0,0)
          picker.popoverPresentationController?.sourceView = self.view
  </code></pre>
  
  <p>The code above works fine and does shows the popover to the user. However, <strong>it also shows a white status bar</strong>.</p>
  
  <p>I tried hiding the status bar in many ways:</p>
  
  <pre><code>UIApplication.sharedApplication().statusBarHidden = true
  </code></pre>
  
  <p>I made sure this <code>String</code> in the info.plist file was set to <code>NO</code>: <code>View controller-based status bar appearance</code>.</p>
  
  <p>I also have  this code in my class:</p>
  
  <pre><code>    override func prefersStatusBarHidden() -&gt; Bool {
      return true
  }
  </code></pre>
  
  <p>The <code>UIViewController</code> Attributes Inspector looks like this:</p>
  
  <p><img src="https://i.imgur.com/BhXCrTe.png" alt="Imgur"></p>
  
  <p>Unluckily, the popover still shows the status bar. Why? How can I fix that?</p>