cuốn sách gpt4 ai đã làm

ios - 这段代码中 'currentDevice' 的类型是什么/如何初始化?

In lại Tác giả: Walker 123 更新时间:2023-11-29 03:00:31 hai mươi bốn 4
mua khóa gpt4 Nike

我试图让我的应用程序(围绕 OpenFrameworks 构建)中的相机自动对焦。看完this SO post我通读了 AV Foundation Programming Guide关于如何设置对焦模式。他们给出的示例代码是:

if ([currentDevice isExposureModeSupported:AVCaptureExposureModeContinuousAutoExposure]) {
CGPoint exposurePoint = CGPointMake(0.5f, 0.5f);
[currentDevice setExposurePointOfInterest:exposurePoint];
[currentDevice setExposureMode:AVCaptureExposureModeContinuousAutoExposure];
}

我一直无法弄清楚如何在 if 语句之外初始化 currentDevice,而且它不在文档中。它应该如何初始化/它是什么类型?谢谢。

câu trả lời hay nhất

您可以阅读有关 AVCaptureDevice Class Reference 的更多信息

它指的是前置或后置摄像头。并且不要忘记导入 AVFoundation.framework

关于ios - 这段代码中 'currentDevice' 的类型是什么/如何初始化?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23357104/

hai mươi bốn 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress