Prepares image representations of the specified assets for later use.
- iOS 8+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 10+
An array of
PHAssetobjects for which to prepare image representations.
The size of the images to be prepared.
An option for how to fit the images to the aspect ratio of the requested size. For details, see
Options specifying how Photos should handle the request, format the requested images, and notify your app of progress or errors. For details, see
When you call this method, Photos begins to fetch image data and generates thumbnail images on a background thread. At any time afterward, you can use the
request method to request individual images from the cache. If Photos has finished preparing a requested image, that method provides the image immediately.
Photos caches images with the exact target size, content mode, and options you specify in this method. If you later request an image with, for example, a different target size than you passed when calling this method, Photos cannot make use of the cache and so it must fetch or generate a new image.