Skip to content

Commit 65a5e5e

Browse files
committed
Fix the compile issue for presrverRatio
1 parent 08f4524 commit 65a5e5e

File tree

3 files changed

+56
-13
lines changed

3 files changed

+56
-13
lines changed

Example/Podfile.lock

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,31 @@ PODS:
99
- SDWebImageSVGCoder (0.1.0):
1010
- SDWebImage/Core (>= 5.0.0-beta2)
1111
- SVGKit (>= 2.x)
12-
- SVGKit (2.0.1):
13-
- CocoaLumberjack (~> 3.x)
12+
- SVGKit (2.1.0):
13+
- CocoaLumberjack (~> 3.0)
1414

1515
DEPENDENCIES:
1616
- SDWebImageSVGCoder (from `../`)
1717
- SVGKit (from `https://github.com/SVGKit/SVGKit.git`, branch `2.x`)
1818

19-
SPEC REPOS:
20-
https://github.com/cocoapods/specs.git:
21-
- CocoaLumberjack
22-
- SDWebImage
23-
2419
EXTERNAL SOURCES:
2520
SDWebImageSVGCoder:
26-
:path: "../"
21+
:path: ../
2722
SVGKit:
2823
:branch: 2.x
2924
:git: https://github.com/SVGKit/SVGKit.git
3025

3126
CHECKOUT OPTIONS:
3227
SVGKit:
33-
:commit: b1eae9cf1b1dbf69bc15334f905f5c602f1b13ca
28+
:commit: 0d4db53890c664fb8605666e6fbccd14912ff821
3429
:git: https://github.com/SVGKit/SVGKit.git
3530

3631
SPEC CHECKSUMS:
3732
CocoaLumberjack: db7cc9e464771f12054c22ff6947c5a58d43a0fd
3833
SDWebImage: e52654ceef9fdc19f4c612d64a5b6d3f05dd81a4
3934
SDWebImageSVGCoder: a39ffaef7618b138d18eef8e3c49c96a3637fbe2
40-
SVGKit: e0b3dd403cc7cf0d66889f32b6aa1a6b38aa6911
35+
SVGKit: 8a2fc74258bdb2abb54d3b65f3dd68b0277a9c4d
4136

4237
PODFILE CHECKSUM: dc5153f27ba2a6dd43c49d8e0100b34b78f46730
4338

44-
COCOAPODS: 1.5.3
39+
COCOAPODS: 1.4.0

Example/SDWebImageSVGCoder.xcodeproj/project.pbxproj

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@
208208
6003F587195388D20070C39A /* Frameworks */,
209209
6003F588195388D20070C39A /* Resources */,
210210
9996E5BF0D2DF1699498034B /* [CP] Embed Pods Frameworks */,
211+
6E9B5025028C084E8C5201BE /* [CP] Copy Pods Resources */,
211212
);
212213
buildRules = (
213214
);
@@ -226,6 +227,8 @@
226227
6003F5AA195388D20070C39A /* Sources */,
227228
6003F5AB195388D20070C39A /* Frameworks */,
228229
6003F5AC195388D20070C39A /* Resources */,
230+
78B77BB5EB3E09EA434F9AD9 /* [CP] Embed Pods Frameworks */,
231+
95FB492014414A34FEAC8799 /* [CP] Copy Pods Resources */,
229232
);
230233
buildRules = (
231234
);
@@ -294,6 +297,21 @@
294297
/* End PBXResourcesBuildPhase section */
295298

296299
/* Begin PBXShellScriptBuildPhase section */
300+
6E9B5025028C084E8C5201BE /* [CP] Copy Pods Resources */ = {
301+
isa = PBXShellScriptBuildPhase;
302+
buildActionMask = 2147483647;
303+
files = (
304+
);
305+
inputPaths = (
306+
);
307+
name = "[CP] Copy Pods Resources";
308+
outputPaths = (
309+
);
310+
runOnlyForDeploymentPostprocessing = 0;
311+
shellPath = /bin/sh;
312+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SDWebImageSVGCoder_Example/Pods-SDWebImageSVGCoder_Example-resources.sh\"\n";
313+
showEnvVarsInLog = 0;
314+
};
297315
750ABDA0E7C25783B338A0BD /* [CP] Check Pods Manifest.lock */ = {
298316
isa = PBXShellScriptBuildPhase;
299317
buildActionMask = 2147483647;
@@ -312,6 +330,36 @@
312330
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
313331
showEnvVarsInLog = 0;
314332
};
333+
78B77BB5EB3E09EA434F9AD9 /* [CP] Embed Pods Frameworks */ = {
334+
isa = PBXShellScriptBuildPhase;
335+
buildActionMask = 2147483647;
336+
files = (
337+
);
338+
inputPaths = (
339+
);
340+
name = "[CP] Embed Pods Frameworks";
341+
outputPaths = (
342+
);
343+
runOnlyForDeploymentPostprocessing = 0;
344+
shellPath = /bin/sh;
345+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SDWebImageSVGCoder_Tests/Pods-SDWebImageSVGCoder_Tests-frameworks.sh\"\n";
346+
showEnvVarsInLog = 0;
347+
};
348+
95FB492014414A34FEAC8799 /* [CP] Copy Pods Resources */ = {
349+
isa = PBXShellScriptBuildPhase;
350+
buildActionMask = 2147483647;
351+
files = (
352+
);
353+
inputPaths = (
354+
);
355+
name = "[CP] Copy Pods Resources";
356+
outputPaths = (
357+
);
358+
runOnlyForDeploymentPostprocessing = 0;
359+
shellPath = /bin/sh;
360+
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SDWebImageSVGCoder_Tests/Pods-SDWebImageSVGCoder_Tests-resources.sh\"\n";
361+
showEnvVarsInLog = 0;
362+
};
315363
9996E5BF0D2DF1699498034B /* [CP] Embed Pods Frameworks */ = {
316364
isa = PBXShellScriptBuildPhase;
317365
buildActionMask = 2147483647;

SDWebImageSVGCoder/Classes/SDImageSVGCoder.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ - (UIImage *)decodedImageWithData:(NSData *)data options:(SDImageCoderOptions *)
5656

5757
if (!CGSizeEqualToSize(imageSize, CGSizeZero)) {
5858
if (preserveAspectRatio) {
59-
SDAdjustSVGContentMode(svgImage, UIViewContentModeScaleAspectFit, imageSize);
59+
[svgImage scaleToFitInside:imageSize];
6060
} else {
61-
SDAdjustSVGContentMode(svgImage, UIViewContentModeScaleToFill, imageSize);
61+
svgImage.size = imageSize;
6262
}
6363
}
6464

0 commit comments

Comments
 (0)