2
- (void)setSession:(AVCaptureSession *)session {
    ((AVPlayerLayer *)[self layer]).videoGravity = AVLayerVideoGravityResizeAspectFill;
    ((AVPlayerLayer *)[self layer]).bounds = ((AVPlayerLayer *)[self layer]).bounds;
    [(AVCaptureVideoPreviewLayer *)[self layer] setSession:session];
}

当我尝试使用 videogravity 代码时,它显示错误,No visible @interface for AVCamViewController声明选择器层,在 AVCAM 示例中显示“self layer”时的三个底行?我该如何解决?

4

0 回答 0