Returns all of the interface orientations that the view controller supports.
- iOS 6.0+
A bit mask specifying which orientations are supported. See
UIInterface for valid bit-mask values. The value returned by 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 are rotated to the new orientation. This method is only called 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 is set to
all for the iPad idiom and
all for the iPhone idiom.
The system intersects 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 to determine whether to rotate. For example, the
portrait orientation is not supported on iPhone X.