【发布时间】:2019-05-24 15:45:15
【问题描述】:
在我的应用中,我允许用户播放照片库中的实况照片。
为此,我使用以下方法:
@IBOutlet weak var livePhotoView: PHLivePhotoView!
@objc func handleTapGesture(_ recognizer: UITapGestureRecognizer) {
if let currentType = currentMediaType {
if currentType == .livePhoto && livePhotoIsPlaying == false {
playImageView.alpha = 0
backButtonView.alpha = 0
ivePhotoView.startPlayback(with: .full)
livePhotoIsPlaying = true
} else if currentType == .livePhoto && livePhotoIsPlaying == true {
livePhotoView.stopPlayback()
livePhotoIsPlaying = false
}
}
}
通过使用这种方法,每当播放我不想要的实况照片时,我都会收到触觉反馈。这是PHLivePhotoView的正常行为吗,有没有办法禁用它?
【问题讨论】:
标签: ios swift haptic-feedback phlivephoto