I\'ve been tearing my hair out trying to get the AVFoundation camera to capture a picture in the correct orientation (i.e. the device orientation) but I can\'t get it to wor
This uses the view controller's orientation method. This works for me, hopefully works for you.
- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
[super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration];
AVCaptureConnection *videoConnection = self.prevLayer.connection;
[videoConnection setVideoOrientation:(AVCaptureVideoOrientation)toInterfaceOrientation];
}