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.
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
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/
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
© 2022 - 2024 — McMap. All rights reserved.