在xcode中搜索RCTUIImageViewAnimated.m,打开这个文件。更改
- (void)displayLayer:(CALayer *)layer 的内容。
改为
- (void)displayLayer:(CALayer *)layer
{
if (_currentFrame) {
layer.contentsScale = self.animatedImageScale;
layer.contents = (__bridge id)_currentFrame.CGImage;
} else {
[super displayLayer:layer];
}
}