Open myzcid opened 8 years ago
可以全屏啊
需要加weakSelf的
/! @constant AVLayerVideoGravityResizeAspect @abstract Preserve aspect ratio; fit within layer bounds. @discussion AVLayerVideoGravityResizeAspect may be used when setting the videoGravity property of an AVPlayerLayer or AVCaptureVideoPreviewLayer instance. / AVF_EXPORT NSString *const AVLayerVideoGravityResizeAspect NS_AVAILABLE(10_7, 4_0);
/_! @constant AVLayerVideoGravityResizeAspectFill @abstract Preserve aspect ratio; fill layer bounds. @discussion AVLayerVideoGravityResizeAspectFill may be used when setting the videoGravity property of an AVPlayerLayer or AVCaptureVideoPreviewLayer instance. / AVF_EXPORT NSString const *_AVLayerVideoGravityResizeAspectFill **NS_AVAILABLE(10_7, 4_0);
[self.previewLayer setVideoGravity:AVLayerVideoGravityResizeAspect]; 改成AVLayerVideoGravityResizeAspectFill就好了
另外 我将根控制器换成其他控制器 相机控制器dealloc有打印 它挂了 没有强引用
怎么我一步步按照demo 只写了 [self setUpSession]; [self initCameraLayer]; 这两个方法 在6s上运行 只有手机右半边拍照的页面啊 。。。
哦 知道了 另外 对焦那一段bolck 没有循引用吧 不需要weak 新手 勿喷