self.interfaceOrientation returns the UIInterfaceOrientation, the current orientation of the interface. This property is in the UIViewController, you can only access this in the UIViewController classes.
[[UIApplication sharedApplication] statusBarOrientation] returns the UIInterfaceOrientation, the current orientation of the application status bar. You can access this property anywhere in your application. My experience shows that this is a more efficient way to get a real interface orientation.
[[UIDevice currentDevice] orientation] returns the UIDeviceOrientation device orientation. You can access this property anywhere in your application. But note that UIDeviceOrientation is not always UIInterfaceOrientation. For example, when your device is on a simple table, you may get an unexpected value.
beryllium Nov 03 '11 at 8:29 2011-11-03 08:29
source share