- (void)setSession:(AVCaptureSession *)session {
((AVPlayerLayer *)[self layer]).videoGravity = AVLayerVideoGravityResizeAspectFill;
((AVPlayerLayer *)[self layer]).bounds = ((AVPlayerLayer *)[self layer]).bounds;
[(AVCaptureVideoPreviewLayer *)[self layer] setSession:session];
}
当我尝试使用视频重力代码时,它显示错误,No visible @interface for AVCamViewController
声明选择器层,当它表示" self layer"在AVCAM样本中?我该如何解决这个问题?