Instance Property

prefersStatusBarHidden

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

Declaration

@property(nonatomic, readonly) BOOL prefersStatusBarHidden;

Return Value

YES if the status bar should be hidden or NO 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 childViewControllerForStatusBarHidden method.

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

See Also

Managing the Status Bar

childViewControllerForStatusBarHidden

Called when the system needs the view controller to use for determining status bar hidden/unhidden state.

childViewControllerForStatusBarStyle

Called when the system needs the view controller to use for determining status bar style.

preferredStatusBarStyle

The preferred status bar style for the view controller.

modalPresentationCapturesStatusBarAppearance

Specifies whether a view controller, presented non-fullscreen, takes over control of status bar appearance from the presenting view controller.

preferredStatusBarUpdateAnimation

Specifies the animation style to use for hiding and showing the status bar for the view controller.

- setNeedsStatusBarAppearanceUpdate

Indicates to the system that the view controller status bar attributes have changed.