Search code examples
iosswiftstatusbar

Swift How to hide Carrier, Time and battery in IOS


i'm getting annoying when i see that bar in top of playing video. How can i hide\unhide status bar in viewcontroller ?

enter image description here

Any help will be appreciated.


Solution

  • In your media player view controller:

    override var prefersStatusBarHidden: Bool {
        return true
    }