Instance Method

stopCachingImagesForAssets:targetSize:contentMode:options:

Cancels image preparation for the specified assets and options.

Declaration

- (void)stopCachingImagesForAssets:(NSArray<PHAsset *> *)assets targetSize:(CGSize)targetSize contentMode:(PHImageContentMode)contentMode options:(PHImageRequestOptions *)options;

Parameters

assets

The array of specific PHAsset objects for which image preparation is in progress but is no longer needed.

targetSize

The target size with which you requested image preparation.

contentMode

The content mode with which you requested image preparation.

options

The options with which you requested image preparation.

Discussion

This method cancels image preparation for the specified assets with the specified options. Use it when image preparation that might be in progress is no longer needed. For example, if you prepare images for a collection view filled with photo thumbnails and then the user chooses a different thumbnail size for your collection view, call this method to cancel generating thumbnail images at the old size.

See Also

Preparing Images

- startCachingImagesForAssets:targetSize:contentMode:options:

Prepares image representations of the specified assets for later use.

- stopCachingImagesForAllAssets

Cancels all image preparation that is currently in progress.