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 did 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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With