Contents

AVCaptureResolvedPhotoSettings

A description of the features and settings in use for an in-progress or complete photo capture request.

Declaration

class AVCaptureResolvedPhotoSettings

Mentioned in

Overview

When you request a photo capture using the AVCapturePhotoOutput capturePhoto(with:delegate:) method, you describe the settings for that capture request in an AVCapturePhotoSettings object. When the capture begins, the photo output calls your delegate methods and provides an AVCaptureResolvedPhotoSettings object detailing the settings that are in effect for that capture. Resolved photo settings objects are immutable; they describe a request that has already been made.

The uniqueID property of a resolved photo settings object passed to one of your AVCapturePhotoCaptureDelegate methods matches the uniqueID value of the AVCapturePhotoSettings object you passed when requesting capture. Use this value to determine which delegate method calls correspond to which capture requests.

Some photo capture settings are automatic, such as the flashMode property. For such settings, the photo output determines whether to use that feature at the moment of capture—you don’t know when requesting a capture whether the feature is active when the capture completes. When the photo output calls your delegate methods, the provided AVCaptureResolvedPhotoSettings object details which automatic features have been set for that capture.

Likewise, the dimensions of an output image or movie may not be set until the moment of capture. For example, when you specify a thumbnail size with the previewPhotoFormat setting, the photo output chooses dimensions that best match your requested size while preserving the aspect ratio of the captured photo. When the photo output calls your delegate methods, use the previewDimensions property of the resolved settings to find the actual preview image dimensions. See the methods listed in Examining Output Dimensions for other cases where output dimensions can change at capture time.

Topics

Resolving photo capture requests

Examining photo capture settings

Examining output dimensions

See Also

Photo settings