I have downloaded a simpleCamera view from Cocoa Controls which use this method
- (AVCaptureVideoOrientation)orientationForConnection
{
AVCaptureVideoOri
Getting the device orientation is not correct. For instance, the device might be in landscape mode, but a view controller that only supports portrait will remain in portrait.
Instead, use this:
[[UIApplication sharedApplication] statusBarOrientation]
Another bonus is that it still uses the UIInterfaceOrientation enum, so very little of your code needs to change.