The interface orientations that the view controller supports.
- iOS 6.0+
- Mac Catalyst 13.0+
A bit mask specifying the supported orientations. See
UIInterface for valid bit-mask values. The value that returns from this method must not be
When the user changes the device orientation, the system calls this method on the root view controller or the topmost presented view controller that fills the window. If the view controller supports the new orientation, the window and view controller rotate accordingly. The system only calls this method if the view controller's
should method returns
Override this method to report all of the orientations that the view controller supports. The default values for a view controller's supported interface orientations are
all for the iPad idiom and
all for the iPhone idiom.
To determine whether to rotate, the system compares the view controller's supported orientations with the app's supported orientations (as determined by the
Info file or the app delegate's
application(_: method) and the device's supported orientations. For example, the
UIView class doesn’t support
UIInterface orientation on devices without a Home button, such as iPhone X.
If your app supports multitasking, the system doesn’t call this method on your view controller because multitasking apps must support all orientations. You can opt out of multitasking by enabling
Requires full screen on your iOS target or by not declaring support for all possible orientations within the