The orientation of the app's user interface.
SDKs
- iOS 2.0+
- Mac Catalyst 13.0+
Framework
- UIKit
Declaration
typedef enum UIInterfaceOrientation : NSInteger {
...
} UIInterfaceOrientation;
Overview
Starting in iOS 8, you should employ the UITrait
and UITrait
APIs, and size class properties as used in those APIs, instead of using UIInterface
constants or otherwise writing your app in terms of interface orientation.
In earlier versions of iOS, you used these constants in the status
property and the set
method. Notice that UIDevice
is assigned to UIInterface
and UIDevice
is assigned to UIInterface
; the reason for this is that rotating the device requires rotating the content in the opposite direction.