2
- (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?

Jason Aller
  • 3,541
  • 28
  • 38
  • 38
Akbapu
  • 779
  • 2
  • 6
  • 14

0 Answers0