📜  2 如何停止 gif 循环 jsx - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:51.493000             🧑  作者: Mango

代码示例1
CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"contents"];
    ...
animation.repeatCount = loopCount == 0 ? 0 : loopCount; // <-- fix for single play gif from joshbedo
animation.fillMode = @"forwards"; // <-- insert this line to prevent the image disappearing after animation