Is there a special method to get iPhones orientation? I don\'t need it in degrees or radians, I want it to return an UIInterfaceOrientation object. I just need it for an if-else
As discussed in other answers, you need the interfaceOrientation, not the deviceOrientation.
The easiest way to get to this, is to use the property interfaceOrientation on your UIViewController. (So most often, just: self.interfaceOrientation will do).
Possible values are:
UIInterfaceOrientationPortrait = UIDeviceOrientationPortrait,
UIInterfaceOrientationPortraitUpsideDown = UIDeviceOrientationPortraitUpsideDown,
UIInterfaceOrientationLandscapeLeft = UIDeviceOrientationLandscapeRight,
UIInterfaceOrientationLandscapeRight = UIDeviceOrientationLandscapeLeft
Remember: Left orientation is entered by turning your device to the right.