Instance Method

photoOutput(_:didFinishCaptureFor:error:)

Notifies the delegate that the capture process is complete.

Declaration

optional func photoOutput(_ output: AVCapturePhotoOutput, didFinishCaptureFor resolvedSettings: AVCaptureResolvedPhotoSettings, error: Error?)

Parameters

captureOutput

The photo output performing the capture.

resolvedSettings

An object describing the settings used for this capture. Match this object’s uniqueID value to the uniqueID property of the photo settings object you initiated capture with to determine which capture request this delegate call corresponds to. You can also use this object to find out which values the photo output has chosen for automatic settings.

error

If the capture process did not complete successfully, an error object describing the failure; otherwise, nil.

Discussion

The photo output calls this method when the entire capture process has finished, and no more delegate messages will be sent for this capture request. Use this time to clean up any resources you’ve allocated that relate to this capture request.

See Also

Monitoring Capture Progress

func photoOutput(AVCapturePhotoOutput, willBeginCaptureFor: AVCaptureResolvedPhotoSettings)

Notifies the delegate that the capture output has resolved settings and will soon begin its capture process.