0

I wonder how to perceive orientation changes even if the device's current orientation is locked (by double clicking home button and pressing the grey orientation lock icon)

However, I've seen video taking apps (UIImagePickerController) that can perceive orientation changes and change its control orientation.

I know that for detecting the change, I can use:

- shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
- UIDeviceOrientationDidChangeNotification

but neither of those methods work if the orientation of the device is locked.

Cezar
  • 55,636
  • 19
  • 86
  • 87
TedCheng
  • 655
  • 4
  • 11
  • possible duplicate of [Detect iOS device orientation lock](http://stackoverflow.com/questions/5410763/detect-ios-device-orientation-lock) – rishi Jun 18 '12 at 08:32

1 Answers1

1

You could use the accelerometer to get the current orientation check this Detect iPhone screen orientation

Community
  • 1
  • 1
Omar Abdelhafith
  • 21,163
  • 5
  • 52
  • 56