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:
UIDeviceOrientationUnknown—The orientation is currently unknown.
UIDeviceOrientationPortrait—The home button is down.
UIDeviceOrientationPortraitUpsideDown—The home button is up.
UIDeviceOrientationLandscapeLeft—The 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.