How to hide status bar of a single view controller in iOS 9?

For Swift 3 & Swift 4 it has changed to overriding a variable like this:

override var prefersStatusBarHidden: Bool {
  return true
}

If you want to “Update” the state once the view controller is already being displayed, you will need to call:

setNeedsStatusBarAppearanceUpdate()

Please refer to the documentation.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)