Search code examples
swiftphlivephoto

How to provide "hint" for Live Photo


In the iOS Human Interface Guidelines under the Live Photos section Apple says this,

"Make sure that users can distinguish a Live Photo from a traditional still photo. It’s especially important to help users make this distinction when they can share the photo. The best way to show users that they’re viewing a Live Photo is to display a little movement that gives a hint of the experience. In cases where a hint isn’t possible, you can display the system-provided badge on the Live Photo. A Live Photo never displays a playback button that looks like a video playback button."

I am kind of confused on how to provide that little hint of movement in my live photo. How do I provide that hint of movement?


Solution

  • You don't need to dissect a Live Photo into still frames and construct an animated UIImage, or dig out the Live Photo's movie file... It's much simpler.

    1. Display your user's Live Photo content in a PHLivePhotoView.
    2. Call startPlaybackWithStyle: and pass .Hint for the playback style to get the "hint" that the HIG is talking about.
    3. There's no step three.