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

Commit

Permalink
Merge pull request #5 from SDWebImage/upgrade_sd_560
Browse files Browse the repository at this point in the history
Fix the compatible with SDWebImage 5.6.0
  • Loading branch information
dreampiggy authored Mar 5, 2020
2 parents e9dac07 + 57afcfc commit 6ee1ef4
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "SDWebImage/SDWebImage" ~> 5.5
github "SDWebImage/SDWebImage" ~> 5.6
github "SVGKit/SVGKit" >= 2.1
4 changes: 2 additions & 2 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
github "CocoaLumberjack/CocoaLumberjack" "3.6.0"
github "SDWebImage/SDWebImage" "5.3.1"
github "CocoaLumberjack/CocoaLumberjack" "3.6.1"
github "SDWebImage/SDWebImage" "5.6.0"
github "SVGKit/SVGKit" "2.1.0"
18 changes: 9 additions & 9 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
PODS:
- CocoaLumberjack (3.6.0):
- CocoaLumberjack/Core (= 3.6.0)
- CocoaLumberjack/Core (3.6.0)
- SDWebImage/Core (5.5.2)
- SDWebImageSVGKitPlugin (1.0.0):
- SDWebImage/Core (~> 5.5)
- CocoaLumberjack (3.6.1):
- CocoaLumberjack/Core (= 3.6.1)
- CocoaLumberjack/Core (3.6.1)
- SDWebImage/Core (5.6.0)
- SDWebImageSVGKitPlugin (1.1.0):
- SDWebImage/Core (~> 5.6)
- SVGKit (>= 2.1)
- SVGKit (2.1.0):
- CocoaLumberjack (~> 3.0)
Expand All @@ -31,9 +31,9 @@ CHECKOUT OPTIONS:
:git: https://github.com/SVGKit/SVGKit.git

SPEC CHECKSUMS:
CocoaLumberjack: 78b0c238666f4f58db069738ec176f4519557516
SDWebImage: 4d5c027c935438f341ed33dbac53ff9f479922ca
SDWebImageSVGKitPlugin: 02e1f98cf9ed0814788bba781fad59ac4185dfc4
CocoaLumberjack: b17ae15142558d08bbacf69775fa10c4abbebcc9
SDWebImage: 21b19f56b4226cdfe3aefe4e6848dc43ed129a86
SDWebImageSVGKitPlugin: b6407acff9177a97ed654794e63e3a93fedbcacc
SVGKit: 8a2fc74258bdb2abb54d3b65f3dd68b0277a9c4d

PODFILE CHECKSUM: 91804dc9be5d336ef696711e8704688dfe2f0a2a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ - (void)viewDidLoad {
NSAssert(svgData.length > 0, @"SVG Data should exist");
}
}];
[imageView2 sd_setImageWithURL:SVGURL2 placeholderImage:nil options:SDWebImageRetryFailed context:@{SDWebImageContextSVGKImageSize : @(imageView2.bounds.size)} progress:nil completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
[imageView2 sd_setImageWithURL:SVGURL2 placeholderImage:nil options:SDWebImageRetryFailed context:@{SDWebImageContextImageThumbnailPixelSize : @(imageView2.bounds.size)} progress:nil completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
if (image) {
NSLog(@"SVG load animation success");
[NSAnimationContext runAnimationGroup:^(NSAnimationContext * _Nonnull context) {
Expand Down
2 changes: 1 addition & 1 deletion SDWebImageSVGKitPlugin.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ TODO: Add long description of the pod here.
s.source_files = 'SDWebImageSVGKitPlugin/Classes/**/*', 'SDWebImageSVGKitPlugin/Module/SDWebImageSVGKitPlugin.h'
s.module_map = 'SDWebImageSVGKitPlugin/Module/SDWebImageSVGKitPlugin.modulemap'

s.dependency 'SDWebImage/Core', '~> 5.5'
s.dependency 'SDWebImage/Core', '~> 5.6'
s.dependency 'SVGKit', '>= 2.1'
end
5 changes: 3 additions & 2 deletions SDWebImageSVGKitPlugin/Classes/SDImageSVGKCoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@

NS_ASSUME_NONNULL_BEGIN

static const SDImageFormat SDImageFormatSVG = 12;

/**
SDImageSVGKCoder is a SVG image coder, which use the SVGKit for SVG rendering. It support a subset of SVG 1.1 spec. For anything related to SVG rendering, please report issue to https://github.com/SVGKit/SVGKit/.
*/
@interface SDImageSVGKCoder : NSObject <SDImageCoder>

@property (nonatomic, class, readonly) SDImageSVGKCoder *sharedCoder;
Expand Down

0 comments on commit 6ee1ef4

Please sign in to comment.