Insfgg99x / Custom-Camera

这是一个用AVFoundation框架制作的一个自定义相机Demo,包含了基本的点击屏幕对焦,以及焦距调整放缩功能。
22 stars 1 forks source link

4s ios9.2.1 不能全屏 什么原因呢 #1

Open myzcid opened 8 years ago

myzcid commented 8 years ago

哦 知道了 另外 对焦那一段bolck 没有循引用吧 不需要weak 新手 勿喷

Insfgg99x commented 8 years ago

可以全屏啊

Insfgg99x commented 8 years ago

需要加weakSelf的

myzcid commented 8 years ago

/! @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有打印 它挂了 没有强引用

MyOnlyOnlySunshine commented 8 years ago

怎么我一步步按照demo 只写了 [self setUpSession]; [self initCameraLayer]; 这两个方法 在6s上运行 只有手机右半边拍照的页面啊 。。。