Contents

setStatusBarOrientation(_:animated:)

Sets the app’s status bar to the specified orientation, optionally animating the transition.

Declaration

func setStatusBarOrientation(_ interfaceOrientation: UIInterfaceOrientation, animated: Bool)

Parameters

  • interfaceOrientation:

    A specific orientation of the status bar. See Uiinterfaceorientation for details. The default value is Portrait.

  • animated:

    True if the transition to the new orientation should be animated; False if it should be immediate, without animation.

Discussion

Calling this method changes the value of the statusBarOrientation property and rotates the status bar, animating the transition if animated is true . If your app has rotatable window content, however, you should not arbitrarily set status-bar orientation using this method. The status-bar orientation set by this method does not change if the device changes orientation.

See Also

Related Documentation

Deprecated methods