Function

UIInterfaceOrientationIsPortrait

Returns a Boolean value indicating whether the user interface is currently presented in a portrait orientation.

Declaration

BOOL UIInterfaceOrientationIsPortrait(UIInterfaceOrientation orientation);

Parameters

orientation

Specify the orientation constant to check.

Return Value

Returns YES if the interface orientation is portrait, otherwise returns NO.

Discussion

The interface orientation can be different than the device orientation. You typically call this function in your view controller code to check the current orientation.

See Also

Interface Orientation

UIInterfaceOrientationIsLandscape

Returns a Boolean value indicating whether the user interface is currently presented in a landscape orientation.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software