Skip to content

Commit

Permalink
Fix the issue that SDAnimatedImageView can not render static image on…
Browse files Browse the repository at this point in the history
… iOS 14.

UIKit some internal behavior changes and we should always update the render layer if we have no `currentFrame`
  • Loading branch information
dreampiggy committed Jun 23, 2020
1 parent 5818cf7 commit bb7b191
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SDWebImage/Core/SDAnimatedImageView.m
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,9 @@ - (void)updateIsProgressiveWithImage:(UIImage *)image
- (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;
Expand Down

0 comments on commit bb7b191

Please sign in to comment.