Contents

prefersStatusBarHidden

Specifies whether the view controller prefers the status bar to be hidden or shown.

Declaration

var prefersStatusBarHidden: Bool { get }

Return Value

true if the status bar should be hidden or false if it should be shown.

Discussion

If you change the return value for this method, call the setNeedsStatusBarAppearanceUpdate() method. To specify that a child view controller should control preferred status bar hidden/unhidden state, implement the childForStatusBarHidden method.

By default, this method returns false with one exception. For apps linked against iOS 8 or later, this method returns true if the view controller is in a vertically compact environment.

See Also

Managing the status bar