From bba155421a4e9cb619c2b8aa59211b9a25df69d1 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Wed, 4 Sep 2019 17:55:09 +0800 Subject: [PATCH] Revert the changes to use super.image, make it still possible for subclassing and override --- SDWebImage/Core/SDAnimatedImageView.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SDWebImage/Core/SDAnimatedImageView.m b/SDWebImage/Core/SDAnimatedImageView.m index a4c59c09..0d3ea034 100644 --- a/SDWebImage/Core/SDAnimatedImageView.m +++ b/SDWebImage/Core/SDAnimatedImageView.m @@ -191,7 +191,7 @@ static NSUInteger SDDeviceFreeMemory() { - (void)setImage:(UIImage *)image { - if (super.image == image) { + if (self.image == image) { return; } @@ -549,7 +549,7 @@ static NSUInteger SDDeviceFreeMemory() { // We must use `image.class conformsToProtocol:` instead of `image conformsToProtocol:` here // Because UIKit on macOS, using internal hard-coded override method, which returns NO if ([image.class conformsToProtocol:@protocol(SDAnimatedImage)] && image.sd_isIncremental) { - UIImage *previousImage = super.image; + UIImage *previousImage = self.image; if ([previousImage.class conformsToProtocol:@protocol(SDAnimatedImage)] && previousImage.sd_isIncremental) { NSData *previousData = [((UIImage *)previousImage) animatedImageData]; NSData *currentData = [((UIImage *)image) animatedImageData];