Contents

prepareToCaptureStillImageBracket(from:withSettingsArray:completionHandler:)

Allows the receiver to prepare resources in advance of capturing a still image bracket.

Declaration

func prepareToCaptureStillImageBracket(from connection: AVCaptureConnection, withSettingsArray settings: [AVCaptureBracketedStillImageSettings], completionHandler handler: @escaping (Bool, (any Error)?) -> Void)

Parameters

  • connection:

    The connection through which the still image bracket should be captured.

  • settings:

    An array of Avcapturebracketedstillimagesettings objects. All the array items must be of the same Avcapturebracketedstillimagesettings subclass, or an Invalidargumentexception exception is thrown.

  • handler:

    A user provided block that will be called asynchronously once resources have successfully been allocated for the specified bracketed capture operation.

    The block has two parameters:

    prepared

    If sufficient resources could not be allocated, this parameter is False, and the error parameter contains a non-nil error value.

    error

    The value is non-nil if an error is encountered.

    If the count of the settings parameter exceeds Maxbracketedcapturestillimagecount, then AVErrorMaximumStillImageCaptureRequestsExceeded is returned.

    You should not assume that the completion handler will be called on a specific thread.

Discussion

Before taking a still image bracket, additional resources may need to be allocated. By calling this method first, you are able to know when the receiver is ready to capture the bracket with the specified settings array.

See Also

Related Documentation

Still image bracketed capture