All,
When i locked the screen orientation,i want use [[UIDevice currentDevice] orientation] to get screen's orientation ,but it always return UIDeviceOrientationPortrait, so, question is how can i get the real Device's orientation.
thank you very much.
Make sure you're enabling orientation notifications via:
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
If that still doesn't work, you can also use the status bar to figure out the current orientation (if your UI is rotating) via:
[[UIApplication sharedApplication] statusBarOrientation];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With