I want to do this:
When the camera is focused, the app will take picture automatically.
But I found there’s no way to detect if the camera is focused.
How can I know if the camera is focused?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
On
AVCuptureDeviceyou should check whether focus is supported.Not all iOS device support focusing, thus you really need to check wether focusing is supported by calling
isFocusModeSupported:Then start monitoring the
adjustingFocusproperty. This tells you wether the device is focusing.Thus while the
adjustingFocusreturnsYESdon’t take the picture, if it changes intoNOthe device should be focused.