---
title: PHLivePhotoView
framework: photosui
role: symbol
role_heading: Class
path: photosui/phlivephotoview
---

# 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.

## Declaration

```swift
class PHLivePhotoView
```

## Mentioned in

Displaying Live Photos

## Overview

Overview Use a Live Photo view to display the photo and control playback of its motion and sound content. In iOS and tvOS, you can obtain Live Photo objects from the Photos library, using the PHPickerViewController or PHAsset and PHImageManager classes, or by creating one from asset resources exported from a Photos library. In macOS, Live Photo objects are available only when editing Live Photo content in a photo editing extension that runs in the Photos app—see the PHContentEditingInput class to access Live Photo content in an editing session. By default, a Live Photo view uses its own gesture recognizer to allow the user to play the motion and sound content of a Live Photo with the same interactions and visual effects seen in the Photos app. To customize this gesture recognizer—for example, to install it on a different view for proper event handling in your app’s view hierarchy—use the playbackGestureRecognizer property. To animate the view briefly to hint that a picture is a Live Photo, use the startPlayback(with:) method with the PHLivePhotoViewPlaybackStyle.hint option. tip: This class displays Live Photos in native iOS and tvOS apps and macOS photo editing extensions. To display Live Photo content on the web, use the LivePhotosKit JS framework.

## Topics

### Choosing a Live Photo to Display

- [livePhoto](photosui/phlivephotoview/livephoto.md)

### Managing Playback

- [playbackGestureRecognizer](photosui/phlivephotoview/playbackgesturerecognizer.md)
- [isMuted](photosui/phlivephotoview/ismuted.md)
- [audioVolume](photosui/phlivephotoview/audiovolume.md)

### Responding to Playback Events

- [delegate](photosui/phlivephotoview/delegate.md)
- [PHLivePhotoViewDelegate](photosui/phlivephotoviewdelegate.md)

### Manually Playing Live Photo Content

- [startPlayback(with:)](photosui/phlivephotoview/startplayback(with:).md)
- [stopPlayback()](photosui/phlivephotoview/stopplayback().md)
- [stopPlayback(animated:)](photosui/phlivephotoview/stopplayback(animated:).md)

### Accessing User Interface Icons for Live Photos

- [livePhotoBadgeImage(options:)](photosui/phlivephotoview/livephotobadgeimage(options:).md)
- [livePhotoBadgeView](photosui/phlivephotoview/livephotobadgeview.md)

### Setting the Content Mode

- [contentMode](photosui/phlivephotoview/contentmode.md)
- [PHLivePhotoViewContentMode](photosui/phlivephotoviewcontentmode.md)

### Constants

- [PHLivePhotoViewPlaybackStyle](photosui/phlivephotoviewplaybackstyle.md)
- [PHLivePhotoBadgeOptions](photosui/phlivephotobadgeoptions.md)

### Instance Properties

- [contentsRect](photosui/phlivephotoview/contentsrect.md)
- [intrinsicContentSize](photosui/phlivephotoview/intrinsiccontentsize.md)

## Relationships

### Inherits From

- [NSView](appkit/nsview.md)
- [UIView](uikit/uiview.md)

### Conforms To

- [CALayerDelegate](quartzcore/calayerdelegate.md)
- [CLBodyIdentifiable](corelocation/clbodyidentifiable.md)
- [CMBodyIdentifiable](coremotion/cmbodyidentifiable.md)
- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSAccessibilityElementProtocol](appkit/nsaccessibilityelementprotocol.md)
- [NSAccessibilityProtocol](appkit/nsaccessibilityprotocol.md)
- [NSAnimatablePropertyContainer](appkit/nsanimatablepropertycontainer.md)
- [NSAppearanceCustomization](appkit/nsappearancecustomization.md)
- [NSCoding](foundation/nscoding.md)
- [NSDraggingDestination](appkit/nsdraggingdestination.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [UIAccessibilityIdentification](uikit/uiaccessibilityidentification.md)
- [UIActivityItemsConfigurationProviding](uikit/uiactivityitemsconfigurationproviding.md)
- [UIAppearance](uikit/uiappearance.md)
- [UIAppearanceContainer](uikit/uiappearancecontainer.md)
- [UICoordinateSpace](uikit/uicoordinatespace.md)
- [UIDynamicItem](uikit/uidynamicitem.md)
- [UIFocusEnvironment](uikit/uifocusenvironment.md)
- [UIFocusItem](uikit/uifocusitem.md)
- [UIFocusItemContainer](uikit/uifocusitemcontainer.md)
- [UILargeContentViewerItem](uikit/uilargecontentvieweritem.md)
- [UIPasteConfigurationSupporting](uikit/uipasteconfigurationsupporting.md)
- [UIPopoverPresentationControllerSourceItem](uikit/uipopoverpresentationcontrollersourceitem.md)
- [UIResponderStandardEditActions](uikit/uiresponderstandardeditactions.md)
- [UITraitChangeObservable](uikit/uitraitchangeobservable-67e94.md)
- [UITraitEnvironment](uikit/uitraitenvironment.md)
- [UIUserActivityRestoring](uikit/uiuseractivityrestoring.md)

## See Also

### Shared photo library

- [Delivering an Enhanced Privacy Experience in Your Photos App](photokit/delivering-an-enhanced-privacy-experience-in-your-photos-app.md)
