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

222 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 best solutions below

4
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
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/