Question

I am making a pretty simple/standard camera app that uses a AVCaptureVideoPreviewLayer. When the user presses a button, I call captureStillImageAsynchronouslyFromConnection on the AVCaptureStillImageOutput to capture an image. At the time that I capture the image, I animate a simple white UIView over the preview layer as an indication to the user that a photo is being captured, and hide it again after the image capture is complete.

My problem is that when the camera flash is on, I don't want to display the white view immediately because the photo capture doesn't actually happen until after the flash has gone off. Is there a way to determine that the flash has finished or that the image capture has actually begun? Perhaps via KVO, NSNotificationCenter, or something?

Was it helpful?

Solution

Try using KVO on the capturingStillImage property of AVCaptureStillImageOutput.

The documentation reads like that may be what you need.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top