【发布时间】:2017-04-30 13:48:15
【问题描述】:
我的应用程序使用相机然后压缩图像 JPEG,ios 版本 = 10 我使用 AVCapturePhotoOutput 错误。我有设置代码:`
self.photoOutput = [[AVCapturePhotoOutput alloc] init];
AVCapturePhotoSettings *photoSettings =
[AVCapturePhotoSettings photoSettingsWithFormat:@{AVVideoCodecKey : AVVideoCodecJPEG}];
[self.photoOutput capturePhotoWithSettings:photoSettings delegate:self];
[self.session addOutput:self.photoOutput];`
我在运行应用程序时遇到问题,应用程序崩溃并出现错误:
[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] No active and enabled video connection
有人知道怎么用吗?谢谢。
【问题讨论】:
标签: ios avcapturesession avcapturephotooutput