Instance Method

stopCachingImages(for:targetSize:contentMode:options:)

Cancels image preparation for the specified assets and options.

Declaration

func stopCachingImages(for assets: [PHAsset], targetSize: CGSize, contentMode: PHImageContentMode, options: PHImageRequestOptions?)

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

func stopCachingImagesForAllAssets()

Cancels all image preparation that is currently in progress.