How can i known the webp which is animated play complete
yaotiancheng-ola opened this issue · comments
姚天成(JackYao/徐三) commented
How can i known the webp which is animated play complete
Yang Chao commented
If you play animated webp with Kingfisher's AnimatedImageView
, you can implement the AnimatedImageViewDelegate
protocol:
class YourViewController: UIViewController, AnimatedImageViewDelegate {
let imageView = AnimatedImageView()
override func viewDidLoad() {
super.viewDidLoad()
imageView.delegate = self
// Load your WebP image into imageView
}
func animatedImageView(_ imageView: AnimatedImageView, didPlayAnimationLoops count: UInt) {
print("Animation finished")
}
}