Function

UIDeviceOrientationIsPortrait(_:)

Returns a Boolean value indicating whether the device is in a portrait orientation.

Declaration

func UIDeviceOrientationIsPortrait(_ orientation: UIDeviceOrientation) -> Bool

Parameters

orientation

Specify the value of the orientation property of the UIDevice class.

Return Value

Returns true if the device orientation is portrait, otherwise returns false.