Working with Basic Orientation

The UIDevice class uses the built-in orientation property to provide the physical orientation of a device. iOS devices support seven possible values for this property:

Image UIDeviceOrientationUnknownThe orientation is currently unknown.

Image UIDeviceOrientationPortraitThe home button is down.

Image UIDeviceOrientationPortraitUpsideDownThe home button is up.

UIDeviceOrientationLandscapeLeftThe home button is to the right.

Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.