On button press I'm presenting an AVPlayerViewController:
func playVideoPressed(sender: UIButton){
let videoURL = NSURL(string: "someUrl")
let player = AVPlayer(URL: videoURL!)
let playerViewController = AVPlayerViewController()
playerViewController.player = player
self.presentViewController(playerViewController, animated: true) {
playerViewController.player!.play()
}
}
This AVPlayerViewController's status bar makes the UI of the current View Controller jump. Can I hide the statusbar from within this "presentViewController call?
I've tried including
playerViewController.prefersStatusBarHidden()
but the player continues to show the status bar.
Thanks