Look at the documentation UIDevice. There is an orientation property. Sort of:
UIDeviceOrientation d = [[UIDevice currentDevice] orientation];
The values dyou are looking for are as follows:
UIDeviceOrientationLandscapeLeft
- The device is in landscape mode, while the device is held in a vertical position, and the home button is on the right side.
UIDeviceOrientationLandscapeRight
- The device is in landscape mode, while the device is held upright and the "Home" button is on the left side.
source
share