I am trying to switch between front and back camera in Objective-C by using UIAccelerometer. Essentially, if the device is face up, I want the back camera to be on. If the device is face down (screen is down), I would like the front camera to be active instead. What is the best way to tackle this problem? I am accessing the camera via AVFoundation. Thanks!I am trying to switch between front and back ca