Looks like orientation for avcapturevideopreviewlayer has been depreciated in iOS 6. Anyone know the new code? Here is my current (depreciated) code:
[self s
Just like @Nikolai posted, use the AVCaptureVideoPreviewLayer's connection's videoOrientation
property instead.
(The reason I am posting this again is because his code may be a bit confusing since it looks like connection
is a class method. Hopefully this example makes it clear.)
Replace the following:
AVCaptureVideoPreviewLayer *previewLayer = ...;
previewLayer.orientation = UIInterfaceOrientationLandscapeRight;
With:
AVCaptureVideoPreviewLayer *previewLayer = ...;
previewLayer.connection.videoOrientation = AVCaptureVideoOrientationLandscapeRight;