开发者

How to know if device supports auto-focus

开发者 https://www.devze.com 2023-01-05 12:27 出处:网络
I would like to know if it exists a way to check if device camera supports auto-focus ? The only solution I found is to check device name in order to know if it supports auto-focus or not. But I di开

I would like to know if it exists a way to check if device camera supports auto-focus ?

The only solution I found is to check device name in order to know if it supports auto-focus or not. But I di开发者_运维百科d not like it because it did not work for future device.


Using the new AVFoundation APIs in iOS 4.0, you can check this by querying the AVCaptureDevice instance for the camera using its -isFocusModeSupported: method. The focus modes include AVCaptureFocusModeLocked, AVCaptureFocusModeAutoFocus, and AVCaptureFocusModeContinuousAutoFocus.

0

精彩评论

暂无评论...
验证码 换一张
取 消