Article

Loading and Caching Assets and Thumbnails

Request image, video, or Live Photos content, and cache for quick reuse.

Overview

Photos automatically downloads or generates images to your specification, caching them for quick reuse. Use the PHImageManager class to request images of assets at a specified size, or AVFoundation objects to work with video assets. When working with large numbers of assets—for example, when populating a collection view with thumbnails—preload images in batches using the PHCachingImageManager subclass.

See Also

Asset Loading

class PHImageManager

An object that facilitates retrieving or generating preview thumbnails and asset data.

class PHCachingImageManager

An object that facilitates retrieving or generating preview thumbnails, optimized for batch preloading large numbers of assets.

class PHImageRequestOptions

A set of options affecting the delivery of still image representations of Photos assets you request from an image manager.

class PHVideoRequestOptions

A set of options affecting the delivery of video asset data that you request from an image manager.

class PHLivePhotoRequestOptions

A set of options affecting the delivery of Live Photo assets you request from an image manager.