看起来在iOS 6中,avcapturevideopreviewlayer的方向已经被弃用。有人知道新代码吗?这是我当前(已弃用)的代码:
[self setPreviewLayer:[[AVCaptureVideoPreviewLayer alloc] initWithSession:[self captureSession]]];
[[self previewLayer] setVideoGravity:AVLayerVideoGravityResizeAspectFill];
previewLayer.orientation = UIInterfaceOrientationLandscapeRight;