Instance Method

startPlayback(with:)

Begins playback of Live Photo content in the view.

Declaration

func startPlayback(with playbackStyle: PHLivePhotoViewPlaybackStyle)

Parameters

playbackStyle

An option for how much of the Live Photo’s motion and sound content to play. See PHLivePhotoViewPlaybackStyle.

Discussion

Use the playbackStyle parameter to choose whether to play the full motion and sound content of the Live Photo or only a brief section.

Typically, an app does not need to directly control playback, because a Live Photo view provides interactive playback control. Use this method only when non-interactive playback is appropriate—for example, to briefly animate the content to indicate that a view contains a Live Photo rather than a still image.

See Also

Manually Playing Live Photo Content

func stopPlayback()

Ends playback of Live Photo content in the view.