Using isSubclassOfClass instead == for animated image class matching check

This commit is contained in:
DreamPiggy 2019-08-02 15:46:44 +08:00
parent 4e7d03d471
commit 43bb20af32
1 changed files with 1 additions and 1 deletions

View File

@ -393,7 +393,7 @@
// Check image class matching
Class animatedImageClass = image.class;
Class desiredImageClass = context[SDWebImageContextAnimatedImageClass];
if (desiredImageClass && animatedImageClass && desiredImageClass != animatedImageClass) {
if (desiredImageClass && ![animatedImageClass isSubclassOfClass:desiredImageClass]) {
image = nil;
}
}