gpt4 book ai didi

ios - 带有完成 block 的图像动画?

转载 作者:搜寻专家 更新时间:2023-11-01 07:13:35 24 4
gpt4 key购买 nike

我使用 Swift 为多个图像制作动画:

    cp.animationImages = images
cp.animationDuration = TimeInterval(speed)
cp.animationRepeatCount=count
cp.startAnimating()

我使用各种延迟在它们之间等待,但是当我需要运行一系列动画时,我希望有一个委托(delegate),这样每次调用都将以特定标记结束,这样我就可以决定要做什么做。我找不到如何在 Swift 中为此动画使用 block /委托(delegate)。

最佳答案

UIImageView 不支持动画完成处理程序,但有可用的扩展:

https://github.com/gurmundi7/UIImageView-AnimationCompletionBlock

关于ios - 带有完成 block 的图像动画?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43569375/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com