Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can i known the webp which is animated play complete #76

Open
yaotiancheng-ola opened this issue Dec 26, 2023 · 1 comment
Open
Labels

Comments

@yaotiancheng-ola
Copy link

How can i known the webp which is animated play complete

@yeatse
Copy link
Owner

yeatse commented Dec 26, 2023

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")
    }
}

@yeatse yeatse added the question label Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants