Instance Method

prepareLivePhotoForPlaybackWithTargetSize:options:completionHandler:

Processes a Live Photo with your edits for viewing.

Declaration

- (void)prepareLivePhotoForPlaybackWithTargetSize:(CGSize)targetSize options:(NSDictionary<NSString *,id> *)options completionHandler:(void (^)(PHLivePhoto *livePhoto, NSError *error))handler;

Parameters

targetSize

The size of the view in which you plan to preview the edited Live Photo output.

options

Options that affect Live Photo rendering. See Live Photo Processing Options.

handler

A block that Photos calls on the main queue after processing is complete. The block takes the following parameters:

livePhoto

The rendered Live Photo, suitable for displaying in a PHLivePhotoView object.

error

If preparing the edited Live Photo for display succeeds, this parameter is nil. If processing fails, the livePhoto parameter is nil, and this parameter contains an error object describing the failure.

Discussion

Use this method to generate preview versions of the edited Live Photo—for example, to display in your editing UI.

See Also

Processing an Editing Context’s Live Photo

- saveLivePhotoToOutput:options:completionHandler:

Processes and saves a full-quality Live Photo as the output of your editing session.

PHLivePhotoEditingOption

Keys for the options dictionary used with the methods listed in Processing an Editing Context’s Live Photo.

- cancel

Aborts any Live Photo processing in progress.