Merge pull request #3043 from dreampiggy/fix_ios14_animated_image_static_render
Fix the issue that SDAnimatedImageView can not render static image on iOS 14.
This commit is contained in:
commit
15fb09afa1
|
@ -466,6 +466,9 @@
|
|||
- (void)displayLayer:(CALayer *)layer
|
||||
{
|
||||
UIImage *currentFrame = self.currentFrame;
|
||||
if (!currentFrame) {
|
||||
currentFrame = self.image;
|
||||
}
|
||||
if (currentFrame) {
|
||||
layer.contentsScale = currentFrame.scale;
|
||||
layer.contents = (__bridge id)currentFrame.CGImage;
|
||||
|
|
Loading…
Reference in New Issue