iphone - presenting an alertview with the right orientation
- by Mike
I have to present an alertview when my app starts. My app supports both landscape modes.
Despite the landscape mode the device is when the app starts the alertview always shows in portrait.
I have tried to use the accelerometer to detect the interface orientation before the orientation notification and I have the correct orientation 2 seconds before the alertview showing.
Then, I use this code to set the status bar to a different orientation, hoping the alertview will follow...
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight];
or left, depending on the landscape mode.
Nothing works.
Is there a way to force the alertview to respect the orientation?
The point here is this: I cannot set one landscape orientation in particular for the status bar, I have to detect the orientation the device is on and then set the status bar orientation.
thanks for any help.