Detect When AVFoundation Camera Finishes Focusing

avfoundation, ios, iphone

Solution

According to doc

You can use the `adjustingFocus` property to determine whether a device is currently focusing. You can observe the property using `key-value observing` to be notified when a device starts and stops focusing.

If you change the focus mode settings, you can return them to the default configuration as follows:

Problem

I currently am using AVFoundation to run my camera, but I want to be able to detect when the camera finishes focusing. Is there any way to do this? Thanks so much!!

Original source