Does beginGeneratingDeviceOrientationNotifications
reset the status bar back to Portrait orientation?
In my app, logging o and p below:
UIInterfaceOrientation o = [[UIApplication sharedApplication] statusBarOrientation];
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
UIInterfaceOrientation p = [[UIApplication sharedApplication] statusBarOrientation];
I get:
o = UIInterfaceOrientationLandscapeRight
p = UIInterfaceOrientationPortrait
Is it me, or is this expected behavior? Where this bites me is that after I beginGeneratingOrientationNotifications
, my notification routine gets called twice back to back, once for UIInterfaceOrientationPortrait
and then UIInterfaceOrientationLandscapeRight
- which is the actual orientation of the iPhone at that moment.
Regardless of how the iPhone is held, I get one UIInterfaceOrientationPortrait
notification before I get the correct one.
Ideas?
On iphone, the app is launched in the portrait mode and then rotated to the specified orientation.