首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >IOS10中的AVCapturePhotoSettings错误?

IOS10中的AVCapturePhotoSettings错误?
EN

Stack Overflow用户
提问于 2016-12-15 11:34:50
回答 0查看 2.6K关注 0票数 1

我的应用程序使用了摄像头然后压缩图像JPEG,ios版本低于10,我使用了AVCaptureStillImageOutput,但ios版本>= 10我使用AVCapturePhotoOutput错误。我有设置代码:`

代码语言:javascript
运行
复制
self.photoOutput = [[AVCapturePhotoOutput alloc] init];
        AVCapturePhotoSettings *photoSettings =
            [AVCapturePhotoSettings photoSettingsWithFormat:@{AVVideoCodecKey : AVVideoCodecJPEG}];

    [self.photoOutput capturePhotoWithSettings:photoSettings delegate:self];
    [self.session addOutput:self.photoOutput];`

我在运行app时遇到问题,app崩溃并出现错误:

代码语言:javascript
运行
复制
[AVCapturePhotoOutput capturePhotoWithSettings:delegate:] No active and enabled video connection

有谁知道怎么用这个吗?谢谢。

EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41156017

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档