Skip to content
This repository has been archived by the owner on Aug 3, 2022. It is now read-only.

Commit

Permalink
Override the UIImage+Metadata category method to provide the correct …
Browse files Browse the repository at this point in the history
…value for SDSVGKImage
  • Loading branch information
dreampiggy committed Mar 5, 2020
1 parent ffb3f01 commit c8ab67e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions SDWebImageSVGKitPlugin/Classes/SDSVGKImage.m
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,31 @@ - (NSUInteger)animatedImageLoopCount {
}

@end

@implementation SDSVGKImage (Metadata)

- (BOOL)sd_isAnimated {
return NO;
}

- (NSUInteger)sd_imageLoopCount {
return self.animatedImageLoopCount;
}

- (void)setSd_imageLoopCount:(NSUInteger)sd_imageLoopCount {
return;
}

- (SDImageFormat)sd_imageFormat {
return SDImageFormatSVG;
}

- (void)setSd_imageFormat:(SDImageFormat)sd_imageFormat {
return;
}

- (BOOL)sd_isVector {
return YES;
}

@end

0 comments on commit c8ab67e

Please sign in to comment.