آموزش جاوااسکریپت انجمن ها react native لوپ شدن GIF در ios پاسخ به: لوپ شدن GIF در ios

#16281

سلام.
فایل react-native/Libraries/Image/RCTGIFImageDecoder.m رو بصورت زیر ویرایش کنید

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