- (void)setSession:(AVCaptureSession *)session {
((AVPlayerLayer *)[self layer]).videoGravity = AVLayerVideoGravityResizeAspectFill;
((AVPlayerLayer *)[self layer]).bounds = ((AVPlayerLayer *)[self layer]).bounds;
[(AVCaptureVideoPreviewLayer *)[self layer] setSession:session];
}
When I try to use the videogravity code, it shows the error, No visible @interface for AVCamViewController
declares the selector layer, on the three bottom lines when it says "self layer" in the AVCAM sample? How do I fix this?