Reputation: 6317
I have an app which records video. I only supported landscape at first, but now I'm offering portrait and other orientations. I set the transform of the video to the orientation it was filmed in as detected from UIDevice. However, with portrait lock on the phone, UIDevice would tell me the current orientation is portrait even if the user was holding the device in landscape.
How can I determine if it's locked, so I can save the video in the proper orientation?
Upvotes: 0
Views: 821
Reputation: 9098
Use the accelerometer on the device to detect orientation.
Check this link for more info: Detect iPhone screen orientation
Upvotes: 3