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

Commit e9ac3a7

Browse files
authored
Merge pull request #9 from SDWebImage/override_metadata_custom_class
Override the UIImage+Metadata category method to provide the correct value for SDFLAnimatedImage
2 parents 0ffa5da + 42a6a8a commit e9ac3a7

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

Diff for: Cartfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github "SDWebImage/SDWebImage" ~> 5.0
1+
github "SDWebImage/SDWebImage" ~> 5.6
22
github "Flipboard/FLAnimatedImage" >= 1.0.11

Diff for: Cartfile.resolved

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
github "Flipboard/FLAnimatedImage" "1.0.14"
2-
github "SDWebImage/SDWebImage" "5.0.0"
2+
github "SDWebImage/SDWebImage" "5.6.0"

Diff for: SDWebImageFLPlugin.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ This project adds a plugin for FLAnimatedImage into SDWebImage, for loading anim
2525
s.source_files = 'SDWebImageFLPlugin/Classes/**/*', 'SDWebImageFLPlugin/Module/SDWebImageFLPlugin.h'
2626
s.module_map = 'SDWebImageFLPlugin/Module/SDWebImageFLPlugin.modulemap'
2727

28-
s.dependency 'SDWebImage/Core', '~> 5.0'
28+
s.dependency 'SDWebImage/Core', '~> 5.6'
2929
s.dependency 'FLAnimatedImage', '>= 1.0.11'
3030
end

Diff for: SDWebImageFLPlugin/Classes/FLAnimatedImageBridge/SDFLAnimatedImage.m

+28
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,31 @@ - (NSUInteger)sd_memoryCost {
145145
}
146146

147147
@end
148+
149+
@implementation SDFLAnimatedImage (Metadata)
150+
151+
- (BOOL)sd_isAnimated {
152+
return YES;
153+
}
154+
155+
- (NSUInteger)sd_imageLoopCount {
156+
return self.animatedImageLoopCount;
157+
}
158+
159+
- (void)setSd_imageLoopCount:(NSUInteger)sd_imageLoopCount {
160+
return;
161+
}
162+
163+
- (SDImageFormat)sd_imageFormat {
164+
return SDImageFormatGIF;
165+
}
166+
167+
- (void)setSd_imageFormat:(SDImageFormat)sd_imageFormat {
168+
return;
169+
}
170+
171+
- (BOOL)sd_isVector {
172+
return NO;
173+
}
174+
175+
@end

0 commit comments

Comments
 (0)