diff --git a/SDWebImage/Core/SDAnimatedImageView.m b/SDWebImage/Core/SDAnimatedImageView.m index 53d697f0..35260315 100644 --- a/SDWebImage/Core/SDAnimatedImageView.m +++ b/SDWebImage/Core/SDAnimatedImageView.m @@ -192,9 +192,8 @@ [self stopAnimating]; [self checkPlay]; - - [self.imageViewLayer setNeedsDisplay]; } + [self.imageViewLayer setNeedsDisplay]; } #pragma mark - Configuration @@ -493,6 +492,11 @@ // If we have no animation frames, call super implementation. iOS 14+ UIImageView use this delegate method for rendering. if ([UIImageView instancesRespondToSelector:@selector(displayLayer:)]) { [super displayLayer:layer]; + } else { + // Fallback to implements the static image rendering by ourselves (like macOS or before iOS 14) + currentFrame = super.image; + layer.contentsScale = currentFrame.scale; + layer.contents = (__bridge id)currentFrame.CGImage; } } }