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

Commit c8ab67e

Browse files
committed
Override the UIImage+Metadata category method to provide the correct value for SDSVGKImage
1 parent ffb3f01 commit c8ab67e

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Diff for: SDWebImageSVGKitPlugin/Classes/SDSVGKImage.m

+28
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,31 @@ - (NSUInteger)animatedImageLoopCount {
116116
}
117117

118118
@end
119+
120+
@implementation SDSVGKImage (Metadata)
121+
122+
- (BOOL)sd_isAnimated {
123+
return NO;
124+
}
125+
126+
- (NSUInteger)sd_imageLoopCount {
127+
return self.animatedImageLoopCount;
128+
}
129+
130+
- (void)setSd_imageLoopCount:(NSUInteger)sd_imageLoopCount {
131+
return;
132+
}
133+
134+
- (SDImageFormat)sd_imageFormat {
135+
return SDImageFormatSVG;
136+
}
137+
138+
- (void)setSd_imageFormat:(SDImageFormat)sd_imageFormat {
139+
return;
140+
}
141+
142+
- (BOOL)sd_isVector {
143+
return YES;
144+
}
145+
146+
@end

0 commit comments

Comments
 (0)