This problem appears to be intermittent, but I am not sure why exactly. When running my application on the device (iPad), I have some code to load a scroll view with some im
If you are having this issue at launch time, you need to use UIDevice to get the device orientation, since statusBarOrientation will always be portrait until after application:didFinishLaunchingWithOptions:. The only caveat is that you need to enable device orientation notifications prior or asking UIDevice for the orientation.
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
UIDeviceOrientation deviceOrientation = [[UIDevice currentDevice] orientation];
[[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications];