AVCapture视频方向纵向问题



看起来avcapturevideoorientationportrait的方向在iOS 6中已被弃用,因为我正在尝试修复Vyne(Vine,但它重写了所有内容(应用程序。有人知道新代码吗?这是我当前(已弃用的(代码:

AVCaptureVideoPreviewLayer *previewLayer = [AVCaptureVideoPreviewLayer layerWithSession:_captureSession];
[previewLayer setFrame:[_previewContainerView bounds]];
[previewLayer setOrientation:AVCaptureVideoOrientationPortrait];
[previewLayer setVideoGravity:AVLayerVideoGravityResizeAspectFill];
[[_previewContainerView layer] addSublayer:previewLayer];
那么,

如果我们真的看标题而不是懒惰地让别人为我们做这件事,会发生什么?

@property(nonatomic) AVCaptureVideoOrientation orientation 
    NS_DEPRECATED_IOS(4_0, 6_0, 
    "Use AVCaptureConnection's videoOrientation instead.");

如果我像夏洛克·福尔摩斯一样聪明,我可能会得出结论,我们应该使用AVCaptureConnection的videoOrientation