Instance Property

preferredStatusBarStyle

The preferred status bar style for the view controller.

Declaration

var preferredStatusBarStyle: UIStatusBarStyle { get }

Return Value

A UIStatusBarStyle key indicating your preferred status bar style for the view controller.

Discussion

You can override the preferred status bar style for a view controller by implementing the childViewControllerForStatusBarStyle method.

If the return value from this method changes, call the setNeedsStatusBarAppearanceUpdate() method.

See Also

Managing the Status Bar

var childViewControllerForStatusBarHidden: UIViewController?

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

var childViewControllerForStatusBarStyle: UIViewController?

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

var prefersStatusBarHidden: Bool

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

var modalPresentationCapturesStatusBarAppearance: Bool

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

var preferredStatusBarUpdateAnimation: UIStatusBarAnimation

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

func setNeedsStatusBarAppearanceUpdate()

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