A displayable representation of a Live Photo—a picture that includes motion and sound from the moments just before and after its capture.


class PHLivePhoto : NSObject


In iOS and tvOS, you can use this class to reference Live Photos from the user’s library (fetched with the PHAsset and PHImageManager classes), to load displayable Live Photo objects from data obtained elsewhere (such as pictures shared through a social network), and to assign Live Photos to PHLivePhotoView objects for display.

In iOS, tvOS, and macOS, you can use this class to display edits in progress for Live Photo content in a photo editing extension.

The PHLivePhoto class serves in much the same role for Live Photos as the UIImage or NSImage class serves for static images. A UIImage or NSImage object represents not the data file an image is loaded from, but instead a ready-to-use image that can be displayed in a view—similarly, a PHLivePhoto object represents a Live Photo ready to display with motion and sound using a PHLivePhotoView object, not an entry in the Photos library or the data resources that constitute a Live Photo. (To work with Live Photos as elements of the Photos library, use the PHAsset class. To work with the data files that constitute a Live Photo, use the PHAssetResource class.)


Inspecting a Live Photo

var size: CGSize

The size, in pixels, of the Live Photo.


typealias PHLivePhotoRequestID

A numeric identifier for an asynchronous Live Photo loading request.

Image Request Identifiers

Special values for the PHLivePhotoRequestID identifier that are returned by asynchronous requests.

Result Handler Info Dictionary Keys

Info describing an attempt to load a Live Photo, used in the info dictionary of the result handler you provide for the request(withResourceFileURLs:placeholderImage:targetSize:contentMode:resultHandler:) method.


Inherits From

See Also

Live Photos

Displaying Live Photos

Provide the same interactive playback of Live Photos as in the iOS Photos app.

class PHLivePhotoView

A view that displays a Live Photo—a picture that also includes motion and sound from the moments just before and after its capture.