How to hide the status bar in an AVPlayerViewController?

How to hide the status bar in an AVPlayerViewController?

i wanna know if this can be done, i’m working on IOS 10, xCode 8 and swift 3, i tried various solutions from here but none works:

i tried to override the prefersStatusBarHidden, i tried to assign a false value but it’s a get-only property and in appdelegate, i can’t do this:

   application.statusBarHidden = true

finally, i set in the plist the following:

  • Status bar is initially hidden to YES View
  • View controller-based status bar appearance to NO

and had no effect, i believe that all this solutions don’t work because the upgrade to IOS 10.