At some point in my application, I would like to temporarily disable the rotation function - to effectively "block" the orientation of the code, similar to what the toggle switch on the lock does on the iPad in hardware.
Now I am doing:
[[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications]
and when I finished, I call:
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications]
While this all works, the API documentation indicates that there should always be a beginning, followed by an end, and I am doing this essentially in the reverse order. Is there a more appropriate API for handling "lock orientation"?
objective-c iphone cocoa-touch ipad orientation
Eric
source share