📅  最后修改于: 2022-03-11 15:03:51.493000             🧑  作者: Mango
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