Is there a way to receive a notification when the iPad gets orientation locked? When the orientation lock is set on or off, it does send a receivedRotate: notification, but I need a way to be able to distinguish normal rotations from lock "rotations".
The problem is I am rotating things in my view when the rotation changes. When the lock is activated, the iPad sends a receivedRotate: with UIInterfaceOrientationPortrait.
I've looked in UIDevice for something like isOrientationLocked, but with no success.
Thanks for any clues on this.
EDIT: I can't comment so I'll just edit..
When the iPad orientation lock is switched ON, it does send a notification that the rotation changed to portrait for some reason. This causes the elements to rotate since they rotate with any orientation change. This is what I want to prevent.
EDIT2: Yes, the iPad shouldn't send a portrait notification but it does. After this portrait notification the iPad stops sending notifications, which is the way it should be. It's just the initial notification that is in the way.
I cannot use the accelerometer because I still want to be able to use the orientation lock's locking feature. Maybe I would use the accelerometer if I had some way of knowing when the iPad was locked.
EDIT3: receivedRotate: is called with UIInterfaceOrientationPortrait for all orientations.