如何使用 IBAnimatable 库为 ui 视图重复设置动画
How to animate a ui view repeatedly with IBAnimatable library
我正在使用 IBAnimatible 库来使用故事板为简单的 UIView 制作动画
当我 运行 应用程序时,动画 (Flash) 仅 运行s 2 次然后停止。
例如如何设置动画(永远)或重复 100 次。
我找不到任何重复字段
似乎Animatable
协议有一个属性叫做repeatCount
,也就是“used to specify the count to repeat the animation.”。为什么不创建一个符合 Animatable
的自定义 UIView
并将 repeatCount
设置为 Float.infinity
? repeatCount
与 flash
动画兼容。如果你提供更多关于你想要动画的上下文,我可以提供一些代码来说明你如何做到这一点。
我正在使用 IBAnimatible 库来使用故事板为简单的 UIView 制作动画
当我 运行 应用程序时,动画 (Flash) 仅 运行s 2 次然后停止。
例如如何设置动画(永远)或重复 100 次。
我找不到任何重复字段
似乎Animatable
协议有一个属性叫做repeatCount
,也就是“used to specify the count to repeat the animation.”。为什么不创建一个符合 Animatable
的自定义 UIView
并将 repeatCount
设置为 Float.infinity
? repeatCount
与 flash
动画兼容。如果你提供更多关于你想要动画的上下文,我可以提供一些代码来说明你如何做到这一点。