Instance Property

isLandscape

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

Declaration

var isLandscape: Bool { get }

Parameters

orientation

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

Return Value

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

See Also

Determining the Current Orientation

var isPortrait: Bool

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

var isFlat: Bool

A Boolean value indicating whether the specified orientation is face up or face down.

Beta
var isValidInterfaceOrientation: Bool

A Boolean value indicating whether the specified orientation is one of the portrait or landscape orientations.