Instance Method

capturePhotoWithSettings:delegate:

Initiates a photo capture using the specified settings.

Declaration

- (void)capturePhotoWithSettings:(AVCapturePhotoSettings *)settings delegate:(id<AVCapturePhotoCaptureDelegate>)delegate;

Parameters

settings

The settings for the photo capture, such as the output pixel format and flash mode. This method copies the provided AVCapturePhotoSettings object, so future changes to that object do not affect the capture in progress.

delegate

A delegate object to receive messages about capture progress and results. The photo output calls your delegate methods as the photo advances from capture to processing to delivery of finished images.

Discussion

Use this method for all variations of still photography, including single photo capture, RAW format capture (with or without a secondary format such as JPEG), bracketed capture of multiple images, and Live Photo capture.

When you call this method, the photo output validates the properties of your settings object to ensure deterministic behavior. For example, the flashMode setting must specify a value that is present in the photo output’s supportedFlashModes array. See each property’s description in the AVCapturePhotoSettings class reference for detailed validation rules.

See Also

Capturing a Photo

AVCapturePhotoSettings

A specification of the features and settings to use for a single photo capture request.

AVCapturePhotoBracketSettings

A specification of the features and settings to use for a photo capture request that captures multiple images with varied settings.

AVCaptureResolvedPhotoSettings

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software