Skip to content

Commit

Permalink
Merge pull request onevcat#664 from ShaharHD/fix/preloadAllAnimationData
Browse files Browse the repository at this point in the history
migrate to preloadAllAnimationData
  • Loading branch information
onevcat authored May 8, 2017
2 parents 34744fa + 63c4bac commit 7e892b0
Show file tree
Hide file tree
Showing 33 changed files with 839 additions and 700 deletions.
6 changes: 3 additions & 3 deletions Kingfisher.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2022,7 +2022,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
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";
showEnvVarsInLog = 0;
};
41D9897B9F81A40122967826 /* 📦 Embed Pods Frameworks */ = {
Expand Down Expand Up @@ -2097,7 +2097,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
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";
showEnvVarsInLog = 0;
};
8D03A7E087A546657F716AD4 /* 📦 Copy Pods Resources */ = {
Expand Down Expand Up @@ -2157,7 +2157,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
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";
showEnvVarsInLog = 0;
};
ABAAA44A45E567D88402EC6A /* 📦 Embed Pods Frameworks */ = {
Expand Down
2 changes: 1 addition & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: bd0768e8d3956c76784f115ce9feab1d939e0834

COCOAPODS: 1.0.1
COCOAPODS: 1.2.1
2 changes: 1 addition & 1 deletion Pods/Manifest.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,315 changes: 683 additions & 632 deletions Pods/Pods.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions Pods/Target Support Files/Nocilla-OSX/Nocilla-OSX-prefix.pch

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Pods/Target Support Files/Nocilla-OSX/Nocilla-OSX.xcconfig

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Pods/Target Support Files/Nocilla-iOS/Nocilla-iOS-prefix.pch

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Pods/Target Support Files/Nocilla-iOS/Nocilla-iOS.xcconfig

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 13 additions & 4 deletions Sources/AnimatedImageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,12 @@ open class AnimatedImageView: UIImageView {
super.didMoveToSuperview()
didMove()
}
// This is for back compatibility that using regular UIImageView to show GIF.
override func shouldPreloadAllGIF() -> Bool {

// This is for back compatibility that using regular UIImageView to show animated image.
override func shouldPreloadAllAnimation() -> Bool {
return false
}

// MARK: - Private method
/// Reset the animator.
private func reset() {
Expand Down Expand Up @@ -353,3 +353,12 @@ extension Array {
private func pure<T>(_ value: T) -> [T] {
return [value]
}

// MARK: - Deprecated. Only for back compatibility.
extension AnimatedImageView {
// This is for back compatibility that using regular UIImageView to show GIF.
@available(*, deprecated, renamed: "shouldPreloadAllAnimation")
override func shouldPreloadAllGIF() -> Bool {
return false
}
}
2 changes: 1 addition & 1 deletion Sources/CacheSerializer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public struct DefaultCacheSerializer: CacheSerializer {
return Kingfisher<Image>.image(
data: data,
scale: options.scaleFactor,
preloadAllGIFData: options.preloadAllGIFData,
preloadAllAnimationData: options.preloadAllAnimationData,
onlyFirstFrame: options.onlyLoadFirstFrame)
}
}
Loading

0 comments on commit 7e892b0

Please sign in to comment.