Make the SDAniamtedImage response to the UIImage+Metadata category method, which should return the status matching the behavior

This commit is contained in:
DreamPiggy 2020-02-12 12:13:04 +08:00
parent 5629af8330
commit 4d354c4acd
1 changed files with 29 additions and 0 deletions

View File

@ -12,6 +12,7 @@
#import "SDImageCodersManager.h" #import "SDImageCodersManager.h"
#import "SDImageFrame.h" #import "SDImageFrame.h"
#import "UIImage+MemoryCacheCost.h" #import "UIImage+MemoryCacheCost.h"
#import "UIImage+Metadata.h"
#import "SDImageAssetManager.h" #import "SDImageAssetManager.h"
#import "objc/runtime.h" #import "objc/runtime.h"
@ -298,3 +299,31 @@ static CGFloat SDImageScaleFromPath(NSString *string) {
} }
@end @end
@implementation SDAnimatedImage (Metadata)
- (BOOL)sd_isAnimated {
return YES;
}
- (NSUInteger)sd_imageLoopCount {
return self.animatedImageLoopCount;
}
- (void)setSd_imageLoopCount:(NSUInteger)sd_imageLoopCount {
return;
}
- (SDImageFormat)sd_imageFormat {
return self.animatedImageFormat;
}
- (void)setSd_imageFormat:(SDImageFormat)sd_imageFormat {
return;
}
- (BOOL)sd_isVector {
return NO;
}
@end