swift - 如何为Live Photo提供 "hint"

标签 swift phlivephoto

在 Live Photos 部分下的 iOS 人机界面指南中,Apple 是这样说的,

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

我对如何在我的实时照片中提供一点运动暗示感到困惑。 我如何提供移动提示?

最佳答案

您无需将 Live Photo 分解为静止帧并构建动画 UIImage,或挖掘出 Live Photo 的电影文件……这要简单得多。

  1. PHLivePhotoView 中显示用户的实时照片内容.
  2. 调用startPlaybackWithStyle:并通过 .Hint用于播放样式以获得 HIG 正在谈论的“提示”。
  3. 没有第三步。

关于swift - 如何为Live Photo提供 "hint",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36782868/

相关文章:

swift - 通过 UIActivityViewController 导出 LivePhoto - Swift

ios - 使用 Swift 4.2 编译框架时 Xcode 9.4 中的 Swift 兼容性问题

ios - WKWebView 无法使用 loadHTMLString(_, baseURL :)) 加载图像和 CSS

swift - 停止在 Swift 中监听 NSEvent

ios - 如何使用 CloudKit API 将 PHLivePhoto 保存到 iCloud

ios - 如何将Live photo保存到文档目录?

swift - 从其他 View Controller 打开窗口+ View

swift - 无法识别的选择器发送到实例

ios - 快速捕捉实时照片

ios - 显示实时照片,swift