Can’t Hide Status Bar—Swift 3, [duplicate]

We need to override the property itself on Swift 3 (this is new in Xcode 8 Beta 4):

override var prefersStatusBarHidden: Bool {  
    return true  
}  

updated Swift 5+

override var prefersStatusBarHidden: Bool { true }

for another example also you can get here and here

For more on what this change is and why it’s necessary, see Matt’s great answer on this.

Leave a Comment