Camera Orientation Change When Picture Taken. Even When Orientation is locked.

194 views Asked by At

I have an app that takes pictures. I want the orientation of the camera view to change when the device is rotated so the picture comes out in the correct orientation that it was taken as. I want this to work even when the device orientation is locked. What is the best way to go about doing this? Accelerometer/Core Motion? Advice and tutorials are much appreciated.

2

There are 2 answers

4
K-Dawg On BEST ANSWER

Just an initial thought, have you considered rotating the picture after it's taken? I'm not sure whether this is the right solution for you as the display will still be oriented on the side when the photo is being taken. this would certainly get around the screen locking issue.

I hope this helps. Kiran

0
fabb On

Seems like there is no way around CoreMotion. Reading out x/y accelerometer data is enough for determining the orientation. This blog post gives a good introduction: http://nshipster.com/cmdevicemotion/