Instance Property


The interface orientation to use when presenting the view controller.


var preferredInterfaceOrientationForPresentation: UIInterfaceOrientation { get }

Return Value

The interface orientation with which to present the view controller.


The system calls this method when presenting the view controller full screen. When your view controller supports two or more orientations but the content appears best in one of those orientations, override this method and return the preferred orientation.

If your view controller implements this method, your view controller’s view is shown in the preferred orientation (although it can later be rotated to another supported rotation). If you do not implement this method, the system presents the view controller using the current orientation of the status bar.

See Also

Configuring the View Rotation Settings

var shouldAutorotate: Bool

A Boolean value that indicates whether the view controller'€™s contents should autorotate.

var supportedInterfaceOrientations: UIInterfaceOrientationMask

The interface orientations that the view controller supports.

class func attemptRotationToDeviceOrientation()

Attempts to rotate all windows to the orientation of the device.