Merge branch 'master' of https://github.com/SDWebImage/SDWebImage into remove_explicit_Tests_deployment
This commit is contained in:
commit
3cd71190b3
|
@ -28,3 +28,6 @@ DerivedData
|
|||
#
|
||||
Pods/
|
||||
Podfile.lock
|
||||
|
||||
# SwiftPM
|
||||
.build
|
33
.travis.yml
33
.travis.yml
|
@ -1,6 +1,6 @@
|
|||
|
||||
language: objective-c
|
||||
osx_image: xcode10.1
|
||||
osx_image: xcode10.2
|
||||
|
||||
env:
|
||||
global:
|
||||
|
@ -16,13 +16,13 @@ addons:
|
|||
- curl # Fix the codecov upload issue
|
||||
|
||||
cache: cocoapods
|
||||
podfile: Examples/Podfile
|
||||
podfile: Podfile
|
||||
|
||||
before_install:
|
||||
- env
|
||||
- locale
|
||||
- gem install cocoapods --no-rdoc --no-ri --no-document --quiet
|
||||
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet
|
||||
- gem install cocoapods --no-document --quiet
|
||||
- gem install xcpretty --no-document --quiet
|
||||
- pod --version
|
||||
- pod repo update --silent
|
||||
- xcpretty --version
|
||||
|
@ -35,10 +35,17 @@ script:
|
|||
- echo Check if the library described by the podspec can be built
|
||||
- pod lib lint --allow-warnings --skip-tests # Will run test below
|
||||
|
||||
- echo Build the SwiftPM
|
||||
- swift build
|
||||
- rm -rf ~/.build
|
||||
|
||||
- echo Build as static library
|
||||
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage static' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
|
||||
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage static' -sdk watchsimulator -configuration Debug | xcpretty -c
|
||||
|
||||
- echo Clean DerivedData
|
||||
- rm -rf ~/Library/Developer/Xcode/DerivedData/
|
||||
|
||||
- echo Build as dynamic frameworks
|
||||
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage' -sdk macosx -configuration Debug | xcpretty -c
|
||||
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
|
||||
|
@ -48,22 +55,24 @@ script:
|
|||
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImageMapKit' -sdk iphonesimulator PLATFORM_NAME=iphonesimulator -configuration Debug | xcpretty -c
|
||||
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImageMapKit' -sdk appletvsimulator -configuration Debug | xcpretty -c
|
||||
|
||||
- echo Clean DerivedData
|
||||
- rm -rf ~/Library/Developer/Xcode/DerivedData/
|
||||
|
||||
- echo Build the Demo apps
|
||||
- pod install --project-directory=Examples
|
||||
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage OSX Demo' -sdk macosx -configuration Debug | xcpretty -c
|
||||
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage iOS Demo' -configuration Debug -destination 'name=iPhone XS' | xcpretty -c
|
||||
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage TV Demo' -sdk appletvsimulator -configuration Debug | xcpretty -c
|
||||
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage Watch Demo' -configuration Debug -destination 'name=iPhone XS' | xcpretty -c
|
||||
- pod install
|
||||
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage OSX Demo' -destination 'platform=macOS,arch=x86_64' -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
||||
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage iOS Demo' -destination 'platform=iOS Simulator,name=iPhone XS' -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
||||
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage TV Demo' -destination 'platform=tvOS Simulator,name=Apple TV 4K' -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
||||
- xcodebuild build -workspace SDWebImage.xcworkspace -scheme 'SDWebImage Watch Demo' -destination 'platform=iOS Simulator,name=iPhone XS' -configuration Debug CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
||||
|
||||
- echo Clean DerivedData
|
||||
- rm -rf ~/Library/Developer/Xcode/DerivedData/
|
||||
- mkdir DerivedData
|
||||
|
||||
- echo Run the tests
|
||||
- pod install --project-directory=Tests
|
||||
- xcodebuild test -workspace SDWebImage.xcworkspace -scheme 'Tests' -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone XS' -configuration Debug | xcpretty -c
|
||||
- xcodebuild clean test -workspace SDWebImage.xcworkspace -scheme 'Tests' -destination 'platform=iOS Simulator,name=iPhone XS' -configuration Debug -UseModernBuildSystem=NO CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
||||
- mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/iOS
|
||||
- xcodebuild test -workspace SDWebImage.xcworkspace -scheme 'Tests Mac' -sdk macosx -destination 'platform=OS X,arch=x86_64' -configuration Debug | xcpretty -c
|
||||
- xcodebuild clean test -workspace SDWebImage.xcworkspace -scheme 'Tests Mac' -destination 'platform=macOS,arch=x86_64' -configuration Debug -UseModernBuildSystem=NO CODE_SIGNING_ALLOWED=NO | xcpretty -c
|
||||
- mv ~/Library/Developer/Xcode/DerivedData/ ./DerivedData/macOS
|
||||
|
||||
after_success:
|
||||
|
|
39
CHANGELOG.md
39
CHANGELOG.md
|
@ -1,3 +1,42 @@
|
|||
## [5.0 Patch, on Jun 5th, 2019](https://github.com/rs/SDWebImage/releases/tag/5.0.6)
|
||||
See [all tickets marked for the 5.0.6 release](https://github.com/SDWebImage/SDWebImage/milestone/42)
|
||||
|
||||
#### Fixes
|
||||
- Fix the SDAnimatedImageRep which use the deprecated API and cause compile issue on Xcode 11 #2745
|
||||
|
||||
## [5.0 Patch, on Jun 3rd, 2019](https://github.com/rs/SDWebImage/releases/tag/5.0.5)
|
||||
See [all tickets marked for the 5.0.5 release](https://github.com/SDWebImage/SDWebImage/milestone/41)
|
||||
|
||||
#### Project
|
||||
- Fix the Static Library target issue of headers, which cause the integrated application failed to Archive because of copied headers #2741
|
||||
|
||||
## [5.0 Patch, on May 29th, 2019](https://github.com/rs/SDWebImage/releases/tag/5.0.4)
|
||||
See [all tickets marked for the 5.0.4 release](https://github.com/SDWebImage/SDWebImage/milestone/40)
|
||||
|
||||
#### Fixes
|
||||
- Fix get button background image operation key bug #2737
|
||||
- Fix that `CGImageDestinationCreateWithData` 0 count arg will log a warning #2739
|
||||
|
||||
#### Tests
|
||||
- Fix the example NSLog issue, and replace the unavailable test image dataset #2740
|
||||
|
||||
## [5.0 Patch, on May 16th, 2019](https://github.com/rs/SDWebImage/releases/tag/5.0.3)
|
||||
See [all tickets marked for the 5.0.3 release](https://github.com/SDWebImage/SDWebImage/milestone/39)
|
||||
|
||||
#### Fixes
|
||||
- Fix SDWebImageDecodeFirstFrameOnly flag is ignored when image loaded from cache #2725
|
||||
- Fix that SDAnimatedImageView initWithImage will skip the initialize logic and crash #2728
|
||||
- Replace if judge with MAX() function in scale less than 1 #2710
|
||||
|
||||
#### Project
|
||||
- Replace the private prefix header files with the manually import for each implementation files #2723
|
||||
|
||||
#### Tests
|
||||
- Added many test case to ensure the code behavior and coverage #2711
|
||||
|
||||
#### Documentation
|
||||
- Update the documentation coverage for jazzy. Use the correct format to provide class/protocol/type API Documentation #2722
|
||||
|
||||
## [5.0 Patch, on Apr 25th, 2019](https://github.com/rs/SDWebImage/releases/tag/5.0.2)
|
||||
See [all tickets marked for the 5.0.2 release](https://github.com/SDWebImage/SDWebImage/milestone/37)
|
||||
|
||||
|
|
|
@ -5,6 +5,3 @@
|
|||
|
||||
// Name of an asset catalog app icon set whose contents will be merged into the `Info.plist`.
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
|
||||
|
||||
// Implicitly include the named header. The path given should either be a project relative path or an absolute path.
|
||||
GCC_PREFIX_HEADER =
|
||||
|
|
|
@ -223,6 +223,3 @@ VERSIONING_SYSTEM = apple-generic
|
|||
|
||||
// Code will load on this and later versions of watchOS. Framework APIs that are unavailable in earlier versions will be weak-linked; your code should check for null function pointers or specific system versions before calling newer APIs.
|
||||
WATCHOS_DEPLOYMENT_TARGET = 2.0
|
||||
|
||||
// Implicitly include the named header. The path given should either be a project relative path or an absolute path.
|
||||
GCC_PREFIX_HEADER = WebImage/SDWebImage-Prefix.pch
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
|
||||
#include "Module-Shared.xcconfig"
|
||||
|
||||
// Implicitly include the named header. The path given should either be a project relative path or an absolute path.
|
||||
GCC_PREFIX_HEADER =
|
||||
// This is a list of paths to folders to be searched by the compiler for included or imported header files when compiling C, Objective-C, C++, or Objective-C++. Paths are delimited by whitespace, so any paths with spaces in them need to be properly quoted.
|
||||
HEADER_SEARCH_PATHS = $(inherited) "$(SRCROOT)/../SDWebImage/Private"
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
|
||||
use_frameworks!
|
||||
|
||||
project 'SDWebImage Demo'
|
||||
workspace '../SDWebImage'
|
||||
|
||||
pod 'SDWebImage/Core', :path => '../'
|
||||
pod 'SDWebImageWebPCoder', :git => 'https://github.com/SDWebImage/SDWebImageWebPCoder.git', :branch => 'master'
|
||||
|
||||
target 'SDWebImage iOS Demo' do
|
||||
platform :ios, '8.0'
|
||||
end
|
||||
|
||||
target 'SDWebImage OSX Demo' do
|
||||
platform :osx, '10.10'
|
||||
end
|
||||
|
||||
target 'SDWebImage TV Demo' do
|
||||
platform :tvos, '9.2'
|
||||
end
|
||||
|
||||
target 'SDWebImage Watch Demo Extension' do
|
||||
platform :watchos, '2.0'
|
||||
end
|
|
@ -128,12 +128,12 @@
|
|||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0829378FA7103DD8649CCCF3 /* Pods-SDWebImage iOS Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage iOS Demo.release.xcconfig"; path = "Pods/Target Support Files/Pods-SDWebImage iOS Demo/Pods-SDWebImage iOS Demo.release.xcconfig"; sourceTree = "<group>"; };
|
||||
0829378FA7103DD8649CCCF3 /* Pods-SDWebImage iOS Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage iOS Demo.release.xcconfig"; path = "../Pods/Target Support Files/Pods-SDWebImage iOS Demo/Pods-SDWebImage iOS Demo.release.xcconfig"; sourceTree = "<group>"; };
|
||||
0DBF9DAE0F88B4C7B529C575 /* Pods_SDWebImage_Watch_Demo_Extension.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SDWebImage_Watch_Demo_Extension.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1299D5267E136DCF87A1A21A /* Pods_SDWebImage_OSX_Demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SDWebImage_OSX_Demo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
225ECB6E7CB8DB707B498522 /* Pods_SDWebImage_iOS_Demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SDWebImage_iOS_Demo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
28B8C1BB2DCC32E213DA3DAD /* Pods-SDWebImage TV Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage TV Demo.release.xcconfig"; path = "Pods/Target Support Files/Pods-SDWebImage TV Demo/Pods-SDWebImage TV Demo.release.xcconfig"; sourceTree = "<group>"; };
|
||||
327E1C604113A7CEC9AC02DB /* Pods-SDWebImage Watch Demo Extension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage Watch Demo Extension.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SDWebImage Watch Demo Extension/Pods-SDWebImage Watch Demo Extension.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
28B8C1BB2DCC32E213DA3DAD /* Pods-SDWebImage TV Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage TV Demo.release.xcconfig"; path = "../Pods/Target Support Files/Pods-SDWebImage TV Demo/Pods-SDWebImage TV Demo.release.xcconfig"; sourceTree = "<group>"; };
|
||||
327E1C604113A7CEC9AC02DB /* Pods-SDWebImage Watch Demo Extension.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage Watch Demo Extension.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-SDWebImage Watch Demo Extension/Pods-SDWebImage Watch Demo Extension.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
32892E301FAE898C00BE8320 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
32892E341FAE89FD00BE8320 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
3E75A9851742DBE700DA412D /* CustomPathImages */ = {isa = PBXFileReference; lastKnownFileType = folder; path = CustomPathImages; sourceTree = SOURCE_ROOT; };
|
||||
|
@ -186,11 +186,11 @@
|
|||
537612B5155AB74D005750A4 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/DetailViewController.xib; sourceTree = "<group>"; };
|
||||
537612E3155ABA3C005750A4 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; };
|
||||
537612E6155ABA44005750A4 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
|
||||
5992BFDBF29AB5CBCAC896FB /* Pods-SDWebImage OSX Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage OSX Demo.release.xcconfig"; path = "Pods/Target Support Files/Pods-SDWebImage OSX Demo/Pods-SDWebImage OSX Demo.release.xcconfig"; sourceTree = "<group>"; };
|
||||
5A56E15AF819F64FBF1F65A9 /* Pods-SDWebImage TV Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage TV Demo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SDWebImage TV Demo/Pods-SDWebImage TV Demo.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
789EDF4244C66933FDF3E181 /* Pods-SDWebImage iOS Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage iOS Demo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SDWebImage iOS Demo/Pods-SDWebImage iOS Demo.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
80C26B77F46D9332F328204E /* Pods-SDWebImage OSX Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage OSX Demo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SDWebImage OSX Demo/Pods-SDWebImage OSX Demo.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
9A205232F437C77F45A2EBD1 /* Pods-SDWebImage Watch Demo Extension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage Watch Demo Extension.release.xcconfig"; path = "Pods/Target Support Files/Pods-SDWebImage Watch Demo Extension/Pods-SDWebImage Watch Demo Extension.release.xcconfig"; sourceTree = "<group>"; };
|
||||
5992BFDBF29AB5CBCAC896FB /* Pods-SDWebImage OSX Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage OSX Demo.release.xcconfig"; path = "../Pods/Target Support Files/Pods-SDWebImage OSX Demo/Pods-SDWebImage OSX Demo.release.xcconfig"; sourceTree = "<group>"; };
|
||||
5A56E15AF819F64FBF1F65A9 /* Pods-SDWebImage TV Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage TV Demo.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-SDWebImage TV Demo/Pods-SDWebImage TV Demo.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
789EDF4244C66933FDF3E181 /* Pods-SDWebImage iOS Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage iOS Demo.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-SDWebImage iOS Demo/Pods-SDWebImage iOS Demo.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
80C26B77F46D9332F328204E /* Pods-SDWebImage OSX Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage OSX Demo.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-SDWebImage OSX Demo/Pods-SDWebImage OSX Demo.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
9A205232F437C77F45A2EBD1 /* Pods-SDWebImage Watch Demo Extension.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SDWebImage Watch Demo Extension.release.xcconfig"; path = "../Pods/Target Support Files/Pods-SDWebImage Watch Demo Extension/Pods-SDWebImage Watch Demo Extension.release.xcconfig"; sourceTree = "<group>"; };
|
||||
BEDA5EB5742642C924545A48 /* Pods_SDWebImage_TV_Demo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SDWebImage_TV_Demo.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
EA9E0C74219598B400AFB434 /* Module-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Module-Release.xcconfig"; sourceTree = "<group>"; };
|
||||
EA9E0C75219598B400AFB434 /* App-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "App-Debug.xcconfig"; sourceTree = "<group>"; };
|
||||
|
@ -635,7 +635,7 @@
|
|||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-SDWebImage OSX Demo/Pods-SDWebImage OSX Demo-frameworks.sh",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImage-macOS/SDWebImage.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImage-Core-MapKit-macOS/SDWebImage.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder-macOS/SDWebImageWebPCoder.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/libwebp-macOS/libwebp.framework",
|
||||
);
|
||||
|
@ -657,7 +657,7 @@
|
|||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-SDWebImage iOS Demo/Pods-SDWebImage iOS Demo-frameworks.sh",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImage-iOS/SDWebImage.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImage-Core-MapKit-iOS/SDWebImage.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder-iOS/SDWebImageWebPCoder.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/libwebp-iOS/libwebp.framework",
|
||||
);
|
||||
|
@ -679,7 +679,7 @@
|
|||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-SDWebImage Watch Demo Extension/Pods-SDWebImage Watch Demo Extension-frameworks.sh",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImage-watchOS/SDWebImage.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImage-Core/SDWebImage.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder-watchOS/SDWebImageWebPCoder.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/libwebp-watchOS/libwebp.framework",
|
||||
);
|
||||
|
@ -773,7 +773,7 @@
|
|||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-SDWebImage TV Demo/Pods-SDWebImage TV Demo-frameworks.sh",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImage-tvOS/SDWebImage.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImage-Core-MapKit-tvOS/SDWebImage.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImageWebPCoder-tvOS/SDWebImageWebPCoder.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/libwebp-tvOS/libwebp.framework",
|
||||
);
|
||||
|
@ -923,7 +923,6 @@
|
|||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 80C26B77F46D9332F328204E /* Pods-SDWebImage OSX Demo.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
INFOPLIST_FILE = "SDWebImage OSX Demo/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
|
@ -937,7 +936,6 @@
|
|||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 5992BFDBF29AB5CBCAC896FB /* Pods-SDWebImage OSX Demo.release.xcconfig */;
|
||||
buildSettings = {
|
||||
CODE_SIGN_IDENTITY = "-";
|
||||
COMBINE_HIDPI_IMAGES = YES;
|
||||
INFOPLIST_FILE = "SDWebImage OSX Demo/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
|
||||
|
|
|
@ -61,13 +61,6 @@
|
|||
ReferencedContainer = "container:SDWebImage Demo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "OS_ACTIVITY_MODE"
|
||||
value = "disable"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
|
|
|
@ -61,13 +61,6 @@
|
|||
ReferencedContainer = "container:SDWebImage Demo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "OS_ACTIVITY_MODE"
|
||||
value = "disable"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
|
|
|
@ -101,13 +101,6 @@
|
|||
ReferencedContainer = "container:SDWebImage Demo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "OS_ACTIVITY_MODE"
|
||||
value = "disable"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
|
|
|
@ -61,13 +61,6 @@
|
|||
ReferencedContainer = "container:SDWebImage Demo.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "OS_ACTIVITY_MODE"
|
||||
value = "default"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#import "MasterViewController.h"
|
||||
#import "DetailViewController.h"
|
||||
#import <SDWebImage/SDWebImage.h>
|
||||
#import <SDWebImageWebPCoder/SDImageWebPCoder.h>
|
||||
#import <SDWebImageWebPCoder/SDWebImageWebPCoder.h>
|
||||
|
||||
@interface MyCustomTableViewCell : UITableViewCell
|
||||
|
||||
|
@ -76,8 +76,9 @@
|
|||
@"http://via.placeholder.com/200x200.jpg",
|
||||
nil];
|
||||
|
||||
for (int i=0; i<100; i++) {
|
||||
[self.objects addObject:[NSString stringWithFormat:@"https://s3.amazonaws.com/fast-image-cache/demo-images/FICDDemoImage%03d.jpg", i]];
|
||||
for (int i=1; i<25; i++) {
|
||||
// From http://r0k.us/graphics/kodak/, 768x512 resolution, 24 bit depth PNG
|
||||
[self.objects addObject:[NSString stringWithFormat:@"http://r0k.us/graphics/kodak/kodak/kodim%02d.png", i]];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#import "ViewController.h"
|
||||
#import <SDWebImage/SDWebImage.h>
|
||||
#import <SDWebImageWebPCoder/SDImageWebPCoder.h>
|
||||
#import <SDWebImageWebPCoder/SDWebImageWebPCoder.h>
|
||||
|
||||
@interface ViewController ()
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
|||
self.imageView1.sd_imageIndicator = SDWebImageProgressIndicator.defaultIndicator;
|
||||
[self.imageView1 sd_setImageWithURL:[NSURL URLWithString:@"https://raw.githubusercontent.com/recurser/exif-orientation-examples/master/Landscape_2.jpg"] placeholderImage:nil options:SDWebImageProgressiveLoad];
|
||||
// NSImageView + Animated Image
|
||||
self.imageView2.sd_imageIndicator = SDWebImageActivityIndicator.largeIndicator;
|
||||
[self.imageView2 sd_setImageWithURL:[NSURL URLWithString:@"https:raw.githubusercontent.com/onevcat/APNGKit/master/TestImages/APNG-cube.apng"]];
|
||||
// SDAnimatedImageView + Static Image
|
||||
[self.imageView3 sd_setImageWithURL:[NSURL URLWithString:@"https://nr-platform.s3.amazonaws.com/uploads/platform/published_extension/branding_icon/275/AmazonS3.png"]];
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#import "ViewController.h"
|
||||
#import <SDWebImage/SDWebImage.h>
|
||||
#import <SDWebImageWebPCoder/SDImageWebPCoder.h>
|
||||
#import <SDWebImageWebPCoder/SDWebImageWebPCoder.h>
|
||||
|
||||
@interface ViewController ()
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
|||
// Do any additional setup after loading the view, typically from a nib.
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageWebPCoder sharedCoder]];
|
||||
|
||||
[self.imageView1 sd_setImageWithURL:[NSURL URLWithString:@"http://s3.amazonaws.com/fast-image-cache/demo-images/FICDDemoImage001.jpg"]];
|
||||
[self.imageView1 sd_setImageWithURL:[NSURL URLWithString:@"https://nokiatech.github.io/heif/content/images/ski_jump_1440x960.heic"]];
|
||||
[self.imageView2 sd_setImageWithURL:[NSURL URLWithString:@"http://www.ioncannon.net/wp-content/uploads/2011/06/test2.webp"]];
|
||||
[self.imageView3 sd_setImageWithURL:[NSURL URLWithString:@"https://raw.githubusercontent.com/liyong03/YLGIFImage/master/YLGIFImageDemo/YLGIFImageDemo/joy.gif"]];
|
||||
[self.imageView4 sd_setImageWithURL:[NSURL URLWithString:@"http://littlesvr.ca/apng/images/SteamEngine.webp"]];
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#import "InterfaceController.h"
|
||||
#import <SDWebImage/SDWebImage.h>
|
||||
#import <SDWebImageWebPCoder/SDImageWebPCoder.h>
|
||||
#import <SDWebImageWebPCoder/SDWebImageWebPCoder.h>
|
||||
|
||||
|
||||
@interface InterfaceController()
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
// swift-tools-version:5.0
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "SDWebImage",
|
||||
platforms: [
|
||||
.macOS(.v10_10),
|
||||
.iOS(.v8),
|
||||
.tvOS(.v9),
|
||||
.watchOS(.v2)
|
||||
],
|
||||
products: [
|
||||
// Products define the executables and libraries produced by a package, and make them visible to other packages.
|
||||
.library(
|
||||
name: "SDWebImage",
|
||||
targets: ["SDWebImage"]),
|
||||
.library(
|
||||
name: "SDWebImageMapKit",
|
||||
targets: ["SDWebImageMapKit"])
|
||||
],
|
||||
dependencies: [
|
||||
// Dependencies declare other packages that this package depends on.
|
||||
// .package(url: /* package url */, from: "1.0.0"),
|
||||
],
|
||||
targets: [
|
||||
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
|
||||
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
|
||||
.target(
|
||||
name: "SDWebImage",
|
||||
dependencies: [],
|
||||
path: "SDWebImage",
|
||||
exclude: ["Private", "MapKit"],
|
||||
cSettings: [
|
||||
.headerSearchPath("."),
|
||||
.headerSearchPath("Private")
|
||||
]
|
||||
),
|
||||
.target(
|
||||
name: "SDWebImageMapKit",
|
||||
dependencies: ["SDWebImage"],
|
||||
path: "SDWebImage",
|
||||
sources: ["MapKit"],
|
||||
publicHeadersPath: "MapKit",
|
||||
cSettings: [
|
||||
.headerSearchPath("."),
|
||||
.headerSearchPath("Private")
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
|
@ -0,0 +1,61 @@
|
|||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
|
||||
use_frameworks!
|
||||
|
||||
def all_example_pods
|
||||
pod 'SDWebImage/MapKit', :path => './'
|
||||
pod 'SDWebImageWebPCoder', :git => 'https://github.com/SDWebImage/SDWebImageWebPCoder.git', :branch => 'master'
|
||||
end
|
||||
|
||||
def watch_example_pods
|
||||
pod 'SDWebImage/Core', :path => './'
|
||||
pod 'SDWebImageWebPCoder', :git => 'https://github.com/SDWebImage/SDWebImageWebPCoder.git', :branch => 'master'
|
||||
end
|
||||
|
||||
def all_test_pods
|
||||
pod 'SDWebImage/MapKit', :path => './'
|
||||
pod 'Expecta'
|
||||
pod 'KVOController'
|
||||
end
|
||||
|
||||
example_project_path = 'Examples/SDWebImage Demo'
|
||||
test_project_path = 'Tests/SDWebImage Tests'
|
||||
workspace 'SDWebImage.xcworkspace'
|
||||
|
||||
# Example Project
|
||||
target 'SDWebImage iOS Demo' do
|
||||
project example_project_path
|
||||
platform :ios, '8.0'
|
||||
all_example_pods
|
||||
end
|
||||
|
||||
target 'SDWebImage OSX Demo' do
|
||||
project example_project_path
|
||||
platform :osx, '10.10'
|
||||
all_example_pods
|
||||
end
|
||||
|
||||
target 'SDWebImage TV Demo' do
|
||||
project example_project_path
|
||||
platform :tvos, '9.2'
|
||||
all_example_pods
|
||||
end
|
||||
|
||||
target 'SDWebImage Watch Demo Extension' do
|
||||
project example_project_path
|
||||
platform :watchos, '2.0'
|
||||
watch_example_pods
|
||||
end
|
||||
|
||||
# Test Project
|
||||
target 'Tests' do
|
||||
project test_project_path
|
||||
platform :ios, '8.0'
|
||||
all_test_pods
|
||||
end
|
||||
|
||||
target 'Tests Mac' do
|
||||
project test_project_path
|
||||
platform :osx, '10.10'
|
||||
all_test_pods
|
||||
end
|
|
@ -1,6 +1,6 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'SDWebImage'
|
||||
s.version = '5.0.2'
|
||||
s.version = '5.0.6'
|
||||
|
||||
s.osx.deployment_target = '10.10'
|
||||
s.ios.deployment_target = '8.0'
|
||||
|
@ -23,7 +23,6 @@ Pod::Spec.new do |s|
|
|||
|
||||
s.requires_arc = true
|
||||
s.framework = 'ImageIO'
|
||||
s.module_map = 'WebImage/SDWebImage.modulemap'
|
||||
|
||||
s.default_subspec = 'Core'
|
||||
|
||||
|
@ -31,7 +30,6 @@ Pod::Spec.new do |s|
|
|||
core.source_files = 'SDWebImage/*.{h,m}', 'WebImage/SDWebImage.h', 'SDWebImage/Private/*.{h,m}'
|
||||
core.exclude_files = 'SDWebImage/MapKit/*.{h,m}'
|
||||
core.private_header_files = 'SDWebImage/Private/*.h'
|
||||
core.prefix_header_contents = '#import "SDInternalMacros.h"'
|
||||
end
|
||||
|
||||
s.subspec 'MapKit' do |mk|
|
||||
|
|
|
@ -7,166 +7,178 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
320CAE152086F50500CFFC80 /* SDWebImageError.h in Headers */ = {isa = PBXBuildFile; fileRef = 320CAE132086F50500CFFC80 /* SDWebImageError.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
320CAE172086F50500CFFC80 /* SDWebImageError.h in Headers */ = {isa = PBXBuildFile; fileRef = 320CAE132086F50500CFFC80 /* SDWebImageError.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
320CAE1B2086F50500CFFC80 /* SDWebImageError.m in Sources */ = {isa = PBXBuildFile; fileRef = 320CAE142086F50500CFFC80 /* SDWebImageError.m */; };
|
||||
320CAE1D2086F50500CFFC80 /* SDWebImageError.m in Sources */ = {isa = PBXBuildFile; fileRef = 320CAE142086F50500CFFC80 /* SDWebImageError.m */; };
|
||||
321B37812083290E00C0EA77 /* SDImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377D2083290D00C0EA77 /* SDImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
321B37832083290E00C0EA77 /* SDImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377D2083290D00C0EA77 /* SDImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
321B37872083290E00C0EA77 /* SDImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B377E2083290D00C0EA77 /* SDImageLoader.m */; };
|
||||
321B37892083290E00C0EA77 /* SDImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B377E2083290D00C0EA77 /* SDImageLoader.m */; };
|
||||
321B378D2083290E00C0EA77 /* SDImageLoadersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377F2083290E00C0EA77 /* SDImageLoadersManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
321B378F2083290E00C0EA77 /* SDImageLoadersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377F2083290E00C0EA77 /* SDImageLoadersManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
321B37932083290E00C0EA77 /* SDImageLoadersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B37802083290E00C0EA77 /* SDImageLoadersManager.m */; };
|
||||
321B37952083290E00C0EA77 /* SDImageLoadersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B37802083290E00C0EA77 /* SDImageLoadersManager.m */; };
|
||||
321E60861F38E8C800405457 /* SDImageCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 321E60841F38E8C800405457 /* SDImageCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
321E60881F38E8C800405457 /* SDImageCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 321E60841F38E8C800405457 /* SDImageCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
321E608C1F38E8C800405457 /* SDImageCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 321E60851F38E8C800405457 /* SDImageCoder.m */; };
|
||||
321E608E1F38E8C800405457 /* SDImageCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 321E60851F38E8C800405457 /* SDImageCoder.m */; };
|
||||
321E60941F38E8ED00405457 /* SDImageIOCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 321E60921F38E8ED00405457 /* SDImageIOCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
321E60961F38E8ED00405457 /* SDImageIOCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 321E60921F38E8ED00405457 /* SDImageIOCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
321E609A1F38E8ED00405457 /* SDImageIOCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 321E60931F38E8ED00405457 /* SDImageIOCoder.m */; };
|
||||
321E609C1F38E8ED00405457 /* SDImageIOCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 321E60931F38E8ED00405457 /* SDImageIOCoder.m */; };
|
||||
321E60A21F38E8F600405457 /* SDImageGIFCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 321E60A01F38E8F600405457 /* SDImageGIFCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
321E60A41F38E8F600405457 /* SDImageGIFCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 321E60A01F38E8F600405457 /* SDImageGIFCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
321E60A81F38E8F600405457 /* SDImageGIFCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 321E60A11F38E8F600405457 /* SDImageGIFCoder.m */; };
|
||||
321E60AA1F38E8F600405457 /* SDImageGIFCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 321E60A11F38E8F600405457 /* SDImageGIFCoder.m */; };
|
||||
321E60BE1F38E91700405457 /* UIImage+ForceDecode.h in Headers */ = {isa = PBXBuildFile; fileRef = 321E60BC1F38E91700405457 /* UIImage+ForceDecode.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
321E60C01F38E91700405457 /* UIImage+ForceDecode.h in Headers */ = {isa = PBXBuildFile; fileRef = 321E60BC1F38E91700405457 /* UIImage+ForceDecode.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
321E60C41F38E91700405457 /* UIImage+ForceDecode.m in Sources */ = {isa = PBXBuildFile; fileRef = 321E60BD1F38E91700405457 /* UIImage+ForceDecode.m */; };
|
||||
321E60C61F38E91700405457 /* UIImage+ForceDecode.m in Sources */ = {isa = PBXBuildFile; fileRef = 321E60BD1F38E91700405457 /* UIImage+ForceDecode.m */; };
|
||||
3237F9E820161AE000A88143 /* NSImage+Compatibility.m in Sources */ = {isa = PBXBuildFile; fileRef = 4397D2F51D0DE2DF00BB2784 /* NSImage+Compatibility.m */; };
|
||||
3237F9EB20161AE000A88143 /* NSImage+Compatibility.m in Sources */ = {isa = PBXBuildFile; fileRef = 4397D2F51D0DE2DF00BB2784 /* NSImage+Compatibility.m */; };
|
||||
3244062C2296C5F400A36084 /* SDWebImageOptionsProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 324406292296C5F400A36084 /* SDWebImageOptionsProcessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3244062D2296C5F400A36084 /* SDWebImageOptionsProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 3244062A2296C5F400A36084 /* SDWebImageOptionsProcessor.m */; };
|
||||
3244062E2296C5F400A36084 /* SDWebImageOptionsProcessor.m in Sources */ = {isa = PBXBuildFile; fileRef = 3244062A2296C5F400A36084 /* SDWebImageOptionsProcessor.m */; };
|
||||
3248475D201775F600AF9E5A /* SDAnimatedImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 32484757201775F600AF9E5A /* SDAnimatedImageView.m */; };
|
||||
3248475F201775F600AF9E5A /* SDAnimatedImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 32484757201775F600AF9E5A /* SDAnimatedImageView.m */; };
|
||||
32484763201775F600AF9E5A /* SDAnimatedImageView+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 32484758201775F600AF9E5A /* SDAnimatedImageView+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32484765201775F600AF9E5A /* SDAnimatedImageView+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 32484758201775F600AF9E5A /* SDAnimatedImageView+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32484769201775F600AF9E5A /* SDAnimatedImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 32484759201775F600AF9E5A /* SDAnimatedImageView.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3248476B201775F600AF9E5A /* SDAnimatedImageView.h in Headers */ = {isa = PBXBuildFile; fileRef = 32484759201775F600AF9E5A /* SDAnimatedImageView.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3248476F201775F600AF9E5A /* SDAnimatedImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3248475A201775F600AF9E5A /* SDAnimatedImage.m */; };
|
||||
32484771201775F600AF9E5A /* SDAnimatedImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 3248475A201775F600AF9E5A /* SDAnimatedImage.m */; };
|
||||
32484775201775F600AF9E5A /* SDAnimatedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3248475B201775F600AF9E5A /* SDAnimatedImage.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32484777201775F600AF9E5A /* SDAnimatedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 3248475B201775F600AF9E5A /* SDAnimatedImage.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3248477B201775F600AF9E5A /* SDAnimatedImageView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 3248475C201775F600AF9E5A /* SDAnimatedImageView+WebCache.m */; };
|
||||
3248477D201775F600AF9E5A /* SDAnimatedImageView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 3248475C201775F600AF9E5A /* SDAnimatedImageView+WebCache.m */; };
|
||||
324DF4B4200A14DC008A84CC /* SDWebImageDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 324DF4B2200A14DC008A84CC /* SDWebImageDefine.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
324DF4B6200A14DC008A84CC /* SDWebImageDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 324DF4B2200A14DC008A84CC /* SDWebImageDefine.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
324DF4BA200A14DC008A84CC /* SDWebImageDefine.m in Sources */ = {isa = PBXBuildFile; fileRef = 324DF4B3200A14DC008A84CC /* SDWebImageDefine.m */; };
|
||||
324DF4BC200A14DC008A84CC /* SDWebImageDefine.m in Sources */ = {isa = PBXBuildFile; fileRef = 324DF4B3200A14DC008A84CC /* SDWebImageDefine.m */; };
|
||||
325312C8200F09910046BF1E /* SDWebImageTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = 325312C6200F09910046BF1E /* SDWebImageTransition.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
325312CA200F09910046BF1E /* SDWebImageTransition.h in Headers */ = {isa = PBXBuildFile; fileRef = 325312C6200F09910046BF1E /* SDWebImageTransition.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
325312CE200F09910046BF1E /* SDWebImageTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 325312C7200F09910046BF1E /* SDWebImageTransition.m */; };
|
||||
325312D0200F09910046BF1E /* SDWebImageTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 325312C7200F09910046BF1E /* SDWebImageTransition.m */; };
|
||||
3257EAF921898AED0097B271 /* SDImageGraphics.h in Headers */ = {isa = PBXBuildFile; fileRef = 3257EAF721898AED0097B271 /* SDImageGraphics.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3257EAFA21898AED0097B271 /* SDImageGraphics.h in Headers */ = {isa = PBXBuildFile; fileRef = 3257EAF721898AED0097B271 /* SDImageGraphics.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3257EAFC21898AED0097B271 /* SDImageGraphics.m in Sources */ = {isa = PBXBuildFile; fileRef = 3257EAF821898AED0097B271 /* SDImageGraphics.m */; };
|
||||
3257EAFD21898AED0097B271 /* SDImageGraphics.m in Sources */ = {isa = PBXBuildFile; fileRef = 3257EAF821898AED0097B271 /* SDImageGraphics.m */; };
|
||||
325C460222339330004CAE11 /* SDImageAssetManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C460022339330004CAE11 /* SDImageAssetManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
325C460322339330004CAE11 /* SDImageAssetManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C460022339330004CAE11 /* SDImageAssetManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
325C460422339330004CAE11 /* SDImageAssetManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 325C460122339330004CAE11 /* SDImageAssetManager.m */; };
|
||||
325C460522339330004CAE11 /* SDImageAssetManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 325C460122339330004CAE11 /* SDImageAssetManager.m */; };
|
||||
325C460822339426004CAE11 /* SDWeakProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C460622339426004CAE11 /* SDWeakProxy.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
325C460922339426004CAE11 /* SDWeakProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C460622339426004CAE11 /* SDWeakProxy.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
325C460A22339426004CAE11 /* SDWeakProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 325C460722339426004CAE11 /* SDWeakProxy.m */; };
|
||||
325C460B22339426004CAE11 /* SDWeakProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = 325C460722339426004CAE11 /* SDWeakProxy.m */; };
|
||||
325C460E223394D8004CAE11 /* SDImageCachesManagerOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C460C223394D8004CAE11 /* SDImageCachesManagerOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
325C460F223394D8004CAE11 /* SDImageCachesManagerOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C460C223394D8004CAE11 /* SDImageCachesManagerOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
325C4610223394D8004CAE11 /* SDImageCachesManagerOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 325C460D223394D8004CAE11 /* SDImageCachesManagerOperation.m */; };
|
||||
325C4611223394D8004CAE11 /* SDImageCachesManagerOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 325C460D223394D8004CAE11 /* SDImageCachesManagerOperation.m */; };
|
||||
325C4614223399F7004CAE11 /* SDImageGIFCoderInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C4612223399F7004CAE11 /* SDImageGIFCoderInternal.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
325C4615223399F7004CAE11 /* SDImageGIFCoderInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C4612223399F7004CAE11 /* SDImageGIFCoderInternal.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
325C461A22339B5F004CAE11 /* SDImageAPNGCoderInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C461822339B5F004CAE11 /* SDImageAPNGCoderInternal.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
325C461B22339B5F004CAE11 /* SDImageAPNGCoderInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C461822339B5F004CAE11 /* SDImageAPNGCoderInternal.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
325C46202233A02E004CAE11 /* UIColor+HexString.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C461E2233A02E004CAE11 /* UIColor+HexString.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
325C46212233A02E004CAE11 /* UIColor+HexString.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C461E2233A02E004CAE11 /* UIColor+HexString.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
325C46222233A02E004CAE11 /* UIColor+HexString.m in Sources */ = {isa = PBXBuildFile; fileRef = 325C461F2233A02E004CAE11 /* UIColor+HexString.m */; };
|
||||
325C46232233A02E004CAE11 /* UIColor+HexString.m in Sources */ = {isa = PBXBuildFile; fileRef = 325C461F2233A02E004CAE11 /* UIColor+HexString.m */; };
|
||||
325C46262233A0A8004CAE11 /* NSBezierPath+RoundedCorners.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C46242233A0A8004CAE11 /* NSBezierPath+RoundedCorners.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
325C46272233A0A8004CAE11 /* NSBezierPath+RoundedCorners.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C46242233A0A8004CAE11 /* NSBezierPath+RoundedCorners.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
325C46282233A0A8004CAE11 /* NSBezierPath+RoundedCorners.m in Sources */ = {isa = PBXBuildFile; fileRef = 325C46252233A0A8004CAE11 /* NSBezierPath+RoundedCorners.m */; };
|
||||
325C46292233A0A8004CAE11 /* NSBezierPath+RoundedCorners.m in Sources */ = {isa = PBXBuildFile; fileRef = 325C46252233A0A8004CAE11 /* NSBezierPath+RoundedCorners.m */; };
|
||||
327054D4206CD8B3006EA328 /* SDImageAPNGCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 327054D2206CD8B3006EA328 /* SDImageAPNGCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
327054D6206CD8B3006EA328 /* SDImageAPNGCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 327054D2206CD8B3006EA328 /* SDImageAPNGCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
327054DA206CD8B3006EA328 /* SDImageAPNGCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 327054D3206CD8B3006EA328 /* SDImageAPNGCoder.m */; };
|
||||
327054DC206CD8B3006EA328 /* SDImageAPNGCoder.m in Sources */ = {isa = PBXBuildFile; fileRef = 327054D3206CD8B3006EA328 /* SDImageAPNGCoder.m */; };
|
||||
328BB69C2081FED200760D6C /* SDWebImageCacheKeyFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 328BB69A2081FED200760D6C /* SDWebImageCacheKeyFilter.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
328BB69E2081FED200760D6C /* SDWebImageCacheKeyFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 328BB69A2081FED200760D6C /* SDWebImageCacheKeyFilter.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
328BB6A22081FED200760D6C /* SDWebImageCacheKeyFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 328BB69B2081FED200760D6C /* SDWebImageCacheKeyFilter.m */; };
|
||||
328BB6A42081FED200760D6C /* SDWebImageCacheKeyFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = 328BB69B2081FED200760D6C /* SDWebImageCacheKeyFilter.m */; };
|
||||
328BB6AA2081FEE500760D6C /* SDWebImageCacheSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 328BB6A82081FEE500760D6C /* SDWebImageCacheSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
328BB6AC2081FEE500760D6C /* SDWebImageCacheSerializer.h in Headers */ = {isa = PBXBuildFile; fileRef = 328BB6A82081FEE500760D6C /* SDWebImageCacheSerializer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
328BB6B02081FEE500760D6C /* SDWebImageCacheSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 328BB6A92081FEE500760D6C /* SDWebImageCacheSerializer.m */; };
|
||||
328BB6B22081FEE500760D6C /* SDWebImageCacheSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 328BB6A92081FEE500760D6C /* SDWebImageCacheSerializer.m */; };
|
||||
328BB6C12082581100760D6C /* SDDiskCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 328BB6BD2082581100760D6C /* SDDiskCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
328BB6C32082581100760D6C /* SDDiskCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 328BB6BD2082581100760D6C /* SDDiskCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
328BB6C72082581100760D6C /* SDDiskCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 328BB6BE2082581100760D6C /* SDDiskCache.m */; };
|
||||
328BB6C92082581100760D6C /* SDDiskCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 328BB6BE2082581100760D6C /* SDDiskCache.m */; };
|
||||
328BB6CD2082581100760D6C /* SDMemoryCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 328BB6BF2082581100760D6C /* SDMemoryCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
328BB6CF2082581100760D6C /* SDMemoryCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 328BB6BF2082581100760D6C /* SDMemoryCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
328BB6D32082581100760D6C /* SDMemoryCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 328BB6C02082581100760D6C /* SDMemoryCache.m */; };
|
||||
328BB6D52082581100760D6C /* SDMemoryCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 328BB6C02082581100760D6C /* SDMemoryCache.m */; };
|
||||
3290FA041FA478AF0047D20C /* SDImageFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 3290FA021FA478AF0047D20C /* SDImageFrame.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3290FA061FA478AF0047D20C /* SDImageFrame.h in Headers */ = {isa = PBXBuildFile; fileRef = 3290FA021FA478AF0047D20C /* SDImageFrame.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
3290FA0A1FA478AF0047D20C /* SDImageFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 3290FA031FA478AF0047D20C /* SDImageFrame.m */; };
|
||||
3290FA0C1FA478AF0047D20C /* SDImageFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 3290FA031FA478AF0047D20C /* SDImageFrame.m */; };
|
||||
329A18591FFF5DFD008C9A2F /* UIImage+Metadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 329A18571FFF5DFD008C9A2F /* UIImage+Metadata.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32935CFE22A4FEDE0049C068 /* SDWebImageManager.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 53922D8E148C56230056699D /* SDWebImageManager.h */; };
|
||||
32935CFF22A4FEDE0049C068 /* SDWebImageCacheKeyFilter.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 328BB69A2081FED200760D6C /* SDWebImageCacheKeyFilter.h */; };
|
||||
32935D0022A4FEDE0049C068 /* SDWebImageCacheSerializer.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 328BB6A82081FEE500760D6C /* SDWebImageCacheSerializer.h */; };
|
||||
32935D0122A4FEDE0049C068 /* SDWebImageDownloader.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 53922D8B148C56230056699D /* SDWebImageDownloader.h */; };
|
||||
32935D0222A4FEDE0049C068 /* SDWebImageDownloaderOperation.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 530E49E316460AE2002868E7 /* SDWebImageDownloaderOperation.h */; };
|
||||
32935D0322A4FEDE0049C068 /* SDWebImageDownloaderConfig.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 32B9B535206ED4230026769D /* SDWebImageDownloaderConfig.h */; };
|
||||
32935D0422A4FEDE0049C068 /* SDWebImageDownloaderRequestModifier.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 32F21B4F20788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.h */; };
|
||||
32935D0522A4FEDE0049C068 /* SDImageLoader.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 321B377D2083290D00C0EA77 /* SDImageLoader.h */; };
|
||||
32935D0622A4FEDE0049C068 /* SDImageLoadersManager.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 321B377F2083290E00C0EA77 /* SDImageLoadersManager.h */; };
|
||||
32935D0722A4FEDE0049C068 /* SDImageCache.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 53922D85148C56230056699D /* SDImageCache.h */; };
|
||||
32935D0822A4FEDE0049C068 /* SDImageCacheConfig.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 43A918621D8308FE00B3925F /* SDImageCacheConfig.h */; };
|
||||
32935D0922A4FEDE0049C068 /* SDMemoryCache.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 328BB6BF2082581100760D6C /* SDMemoryCache.h */; };
|
||||
32935D0A22A4FEDE0049C068 /* SDDiskCache.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 328BB6BD2082581100760D6C /* SDDiskCache.h */; };
|
||||
32935D0B22A4FEDE0049C068 /* SDImageCacheDefine.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 32D1221A2080B2EB003685A3 /* SDImageCacheDefine.h */; };
|
||||
32935D0C22A4FEDE0049C068 /* SDImageCachesManager.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 32D1221D2080B2EB003685A3 /* SDImageCachesManager.h */; };
|
||||
32935D0D22A4FEDE0049C068 /* SDImageCodersManager.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 807A12261F89636300EC2A9B /* SDImageCodersManager.h */; };
|
||||
32935D0E22A4FEDE0049C068 /* SDImageCoder.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 321E60841F38E8C800405457 /* SDImageCoder.h */; };
|
||||
32935D0F22A4FEDE0049C068 /* SDImageIOCoder.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 321E60921F38E8ED00405457 /* SDImageIOCoder.h */; };
|
||||
32935D1022A4FEDE0049C068 /* SDImageGIFCoder.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 321E60A01F38E8F600405457 /* SDImageGIFCoder.h */; };
|
||||
32935D1122A4FEDE0049C068 /* SDImageAPNGCoder.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 327054D2206CD8B3006EA328 /* SDImageAPNGCoder.h */; };
|
||||
32935D1222A4FEDE0049C068 /* SDImageFrame.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3290FA021FA478AF0047D20C /* SDImageFrame.h */; };
|
||||
32935D1322A4FEDE0049C068 /* SDImageCoderHelper.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 32CF1C051FA496B000004BD1 /* SDImageCoderHelper.h */; };
|
||||
32935D1422A4FEDE0049C068 /* SDImageGraphics.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3257EAF721898AED0097B271 /* SDImageGraphics.h */; };
|
||||
32935D1522A4FEDE0049C068 /* SDWebImagePrefetcher.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 53922D91148C56230056699D /* SDWebImagePrefetcher.h */; };
|
||||
32935D1622A4FEDE0049C068 /* SDImageTransformer.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 32F7C06D2030114C00873181 /* SDImageTransformer.h */; };
|
||||
32935D1722A4FEDE0049C068 /* SDAnimatedImage.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 3248475B201775F600AF9E5A /* SDAnimatedImage.h */; };
|
||||
32935D1822A4FEDE0049C068 /* SDAnimatedImageView.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 32484759201775F600AF9E5A /* SDAnimatedImageView.h */; };
|
||||
32935D1922A4FEDE0049C068 /* SDAnimatedImageView+WebCache.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 32484758201775F600AF9E5A /* SDAnimatedImageView+WebCache.h */; };
|
||||
32935D1A22A4FEDE0049C068 /* SDAnimatedImageRep.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 320224B9203979BA00E9F285 /* SDAnimatedImageRep.h */; };
|
||||
32935D1B22A4FEDE0049C068 /* SDWebImageCompat.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 53922D88148C56230056699D /* SDWebImageCompat.h */; };
|
||||
32935D1C22A4FEDE0049C068 /* SDWebImageError.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 320CAE132086F50500CFFC80 /* SDWebImageError.h */; };
|
||||
32935D1D22A4FEDE0049C068 /* SDWebImageOperation.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 530E49E71646388E002868E7 /* SDWebImageOperation.h */; };
|
||||
32935D1E22A4FEDE0049C068 /* SDWebImageDefine.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 324DF4B2200A14DC008A84CC /* SDWebImageDefine.h */; };
|
||||
32935D1F22A4FEDE0049C068 /* SDWebImageTransition.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 325312C6200F09910046BF1E /* SDWebImageTransition.h */; };
|
||||
32935D2022A4FEDE0049C068 /* SDWebImageIndicator.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 32C0FDDF2013426C001B8F2D /* SDWebImageIndicator.h */; };
|
||||
32935D2122A4FEDE0049C068 /* NSData+ImageContentType.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 5D5B9140188EE8DD006D06BD /* NSData+ImageContentType.h */; };
|
||||
32935D2222A4FEDE0049C068 /* UIImage+GIF.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = A18A6CC5172DC28500419892 /* UIImage+GIF.h */; };
|
||||
32935D2322A4FEDE0049C068 /* UIImage+Metadata.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 329A18571FFF5DFD008C9A2F /* UIImage+Metadata.h */; };
|
||||
32935D2422A4FEDE0049C068 /* UIImage+MultiFormat.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 53EDFB8817623F7C00698166 /* UIImage+MultiFormat.h */; };
|
||||
32935D2522A4FEDE0049C068 /* UIImage+ForceDecode.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 321E60BC1F38E91700405457 /* UIImage+ForceDecode.h */; };
|
||||
32935D2622A4FEDE0049C068 /* UIImage+Transform.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 32F7C07D2030719600873181 /* UIImage+Transform.h */; };
|
||||
32935D2722A4FEDE0049C068 /* UIImage+MemoryCacheCost.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 32D3CDCD21DDE87300C4DB49 /* UIImage+MemoryCacheCost.h */; };
|
||||
32935D2822A4FEDE0049C068 /* NSImage+Compatibility.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 4397D2F41D0DE2DF00BB2784 /* NSImage+Compatibility.h */; };
|
||||
32935D2922A4FEDE0049C068 /* UIView+WebCacheOperation.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = AB615301192DA24600A2D8E9 /* UIView+WebCacheOperation.h */; };
|
||||
32935D2A22A4FEDE0049C068 /* NSButton+WebCache.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 321DB35F2011D4D60015D2CB /* NSButton+WebCache.h */; };
|
||||
32935D2B22A4FEDE0049C068 /* UIButton+WebCache.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 53922D93148C56230056699D /* UIButton+WebCache.h */; };
|
||||
32935D2C22A4FEDE0049C068 /* UIImageView+HighlightedWebCache.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = ABBE71A518C43B4D00B75E91 /* UIImageView+HighlightedWebCache.h */; };
|
||||
32935D2D22A4FEDE0049C068 /* UIImageView+WebCache.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 53922D95148C56230056699D /* UIImageView+WebCache.h */; };
|
||||
32935D2E22A4FEDE0049C068 /* UIView+WebCache.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 4369C2751D9807EC007E863A /* UIView+WebCache.h */; };
|
||||
32935D2F22A4FEE50049C068 /* SDWebImage.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 4A2CAE031AB4BB5400B6BC39 /* SDWebImage.h */; };
|
||||
329A185B1FFF5DFD008C9A2F /* UIImage+Metadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 329A18571FFF5DFD008C9A2F /* UIImage+Metadata.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
329A185F1FFF5DFD008C9A2F /* UIImage+Metadata.m in Sources */ = {isa = PBXBuildFile; fileRef = 329A18581FFF5DFD008C9A2F /* UIImage+Metadata.m */; };
|
||||
329A18611FFF5DFD008C9A2F /* UIImage+Metadata.m in Sources */ = {isa = PBXBuildFile; fileRef = 329A18581FFF5DFD008C9A2F /* UIImage+Metadata.m */; };
|
||||
329F1236223FAA3B00B309FD /* SDmetamacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 329F1235223FAA3B00B309FD /* SDmetamacros.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
329F1237223FAA3B00B309FD /* SDmetamacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 329F1235223FAA3B00B309FD /* SDmetamacros.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
329F1240223FAD3400B309FD /* SDInternalMacros.m in Sources */ = {isa = PBXBuildFile; fileRef = 329F123E223FAD3400B309FD /* SDInternalMacros.m */; };
|
||||
329F1241223FAD3400B309FD /* SDInternalMacros.m in Sources */ = {isa = PBXBuildFile; fileRef = 329F123E223FAD3400B309FD /* SDInternalMacros.m */; };
|
||||
329F1242223FAD3400B309FD /* SDInternalMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 329F123F223FAD3400B309FD /* SDInternalMacros.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
329F1243223FAD3400B309FD /* SDInternalMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 329F123F223FAD3400B309FD /* SDInternalMacros.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
32B5CC60222F89C2005EB74E /* SDAsyncBlockOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 32B5CC5E222F89C2005EB74E /* SDAsyncBlockOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
32B5CC61222F89C2005EB74E /* SDAsyncBlockOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B5CC5F222F89C2005EB74E /* SDAsyncBlockOperation.m */; };
|
||||
32B5CC62222F89F6005EB74E /* SDAsyncBlockOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 32B5CC5E222F89C2005EB74E /* SDAsyncBlockOperation.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||
32B5CC63222F8B70005EB74E /* SDAsyncBlockOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B5CC5F222F89C2005EB74E /* SDAsyncBlockOperation.m */; };
|
||||
32B9B537206ED4230026769D /* SDWebImageDownloaderConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 32B9B535206ED4230026769D /* SDWebImageDownloaderConfig.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32B9B539206ED4230026769D /* SDWebImageDownloaderConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 32B9B535206ED4230026769D /* SDWebImageDownloaderConfig.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32B9B53D206ED4230026769D /* SDWebImageDownloaderConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B9B536206ED4230026769D /* SDWebImageDownloaderConfig.m */; };
|
||||
32B9B53F206ED4230026769D /* SDWebImageDownloaderConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 32B9B536206ED4230026769D /* SDWebImageDownloaderConfig.m */; };
|
||||
32C0FDE12013426C001B8F2D /* SDWebImageIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 32C0FDDF2013426C001B8F2D /* SDWebImageIndicator.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32C0FDE32013426C001B8F2D /* SDWebImageIndicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 32C0FDDF2013426C001B8F2D /* SDWebImageIndicator.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32C0FDE72013426C001B8F2D /* SDWebImageIndicator.m in Sources */ = {isa = PBXBuildFile; fileRef = 32C0FDE02013426C001B8F2D /* SDWebImageIndicator.m */; };
|
||||
32C0FDE92013426C001B8F2D /* SDWebImageIndicator.m in Sources */ = {isa = PBXBuildFile; fileRef = 32C0FDE02013426C001B8F2D /* SDWebImageIndicator.m */; };
|
||||
32CF1C071FA496B000004BD1 /* SDImageCoderHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 32CF1C051FA496B000004BD1 /* SDImageCoderHelper.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32CF1C091FA496B000004BD1 /* SDImageCoderHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 32CF1C051FA496B000004BD1 /* SDImageCoderHelper.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32CF1C0D1FA496B000004BD1 /* SDImageCoderHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 32CF1C061FA496B000004BD1 /* SDImageCoderHelper.m */; };
|
||||
32CF1C0F1FA496B000004BD1 /* SDImageCoderHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 32CF1C061FA496B000004BD1 /* SDImageCoderHelper.m */; };
|
||||
32D1221E2080B2EB003685A3 /* SDImageCacheDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 32D1221A2080B2EB003685A3 /* SDImageCacheDefine.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32D122202080B2EB003685A3 /* SDImageCacheDefine.h in Headers */ = {isa = PBXBuildFile; fileRef = 32D1221A2080B2EB003685A3 /* SDImageCacheDefine.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32D122242080B2EB003685A3 /* SDImageCacheDefine.m in Sources */ = {isa = PBXBuildFile; fileRef = 32D1221B2080B2EB003685A3 /* SDImageCacheDefine.m */; };
|
||||
32D122262080B2EB003685A3 /* SDImageCacheDefine.m in Sources */ = {isa = PBXBuildFile; fileRef = 32D1221B2080B2EB003685A3 /* SDImageCacheDefine.m */; };
|
||||
32D1222A2080B2EB003685A3 /* SDImageCachesManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 32D1221C2080B2EB003685A3 /* SDImageCachesManager.m */; };
|
||||
32D1222C2080B2EB003685A3 /* SDImageCachesManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 32D1221C2080B2EB003685A3 /* SDImageCachesManager.m */; };
|
||||
32D122302080B2EB003685A3 /* SDImageCachesManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 32D1221D2080B2EB003685A3 /* SDImageCachesManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32D122322080B2EB003685A3 /* SDImageCachesManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 32D1221D2080B2EB003685A3 /* SDImageCachesManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32D3CDCE21DDE87300C4DB49 /* UIImage+MemoryCacheCost.m in Sources */ = {isa = PBXBuildFile; fileRef = 32D3CDCC21DDE87300C4DB49 /* UIImage+MemoryCacheCost.m */; };
|
||||
32D3CDCF21DDE87300C4DB49 /* UIImage+MemoryCacheCost.m in Sources */ = {isa = PBXBuildFile; fileRef = 32D3CDCC21DDE87300C4DB49 /* UIImage+MemoryCacheCost.m */; };
|
||||
32D3CDD021DDE87300C4DB49 /* UIImage+MemoryCacheCost.h in Headers */ = {isa = PBXBuildFile; fileRef = 32D3CDCD21DDE87300C4DB49 /* UIImage+MemoryCacheCost.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32D3CDD121DDE87300C4DB49 /* UIImage+MemoryCacheCost.h in Headers */ = {isa = PBXBuildFile; fileRef = 32D3CDCD21DDE87300C4DB49 /* UIImage+MemoryCacheCost.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32E5690822B1FFCA00CBABC6 /* SDWebImageOptionsProcessor.h in Copy Headers */ = {isa = PBXBuildFile; fileRef = 324406292296C5F400A36084 /* SDWebImageOptionsProcessor.h */; };
|
||||
32EB6D8E206D132E005CAEF6 /* SDAnimatedImageRep.m in Sources */ = {isa = PBXBuildFile; fileRef = 320224BA203979BA00E9F285 /* SDAnimatedImageRep.m */; };
|
||||
32EB6D91206D132E005CAEF6 /* SDAnimatedImageRep.m in Sources */ = {isa = PBXBuildFile; fileRef = 320224BA203979BA00E9F285 /* SDAnimatedImageRep.m */; };
|
||||
32F21B5120788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 32F21B4F20788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32F21B5320788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.h in Headers */ = {isa = PBXBuildFile; fileRef = 32F21B4F20788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32F21B5720788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 32F21B5020788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.m */; };
|
||||
32F21B5920788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.m in Sources */ = {isa = PBXBuildFile; fileRef = 32F21B5020788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.m */; };
|
||||
32F7C06F2030114C00873181 /* SDImageTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = 32F7C06D2030114C00873181 /* SDImageTransformer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32F7C0712030114C00873181 /* SDImageTransformer.h in Headers */ = {isa = PBXBuildFile; fileRef = 32F7C06D2030114C00873181 /* SDImageTransformer.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32F7C0752030114C00873181 /* SDImageTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 32F7C06E2030114C00873181 /* SDImageTransformer.m */; };
|
||||
32F7C0772030114C00873181 /* SDImageTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 32F7C06E2030114C00873181 /* SDImageTransformer.m */; };
|
||||
32F7C07E2030719600873181 /* UIImage+Transform.m in Sources */ = {isa = PBXBuildFile; fileRef = 32F7C07C2030719600873181 /* UIImage+Transform.m */; };
|
||||
32F7C0802030719600873181 /* UIImage+Transform.m in Sources */ = {isa = PBXBuildFile; fileRef = 32F7C07C2030719600873181 /* UIImage+Transform.m */; };
|
||||
32F7C0842030719600873181 /* UIImage+Transform.h in Headers */ = {isa = PBXBuildFile; fileRef = 32F7C07D2030719600873181 /* UIImage+Transform.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32F7C0862030719600873181 /* UIImage+Transform.h in Headers */ = {isa = PBXBuildFile; fileRef = 32F7C07D2030719600873181 /* UIImage+Transform.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
32FDE8A220888789008D7530 /* SDWebImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 4A2CAE031AB4BB5400B6BC39 /* SDWebImage.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
4369C2771D9807EC007E863A /* UIView+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 4369C2751D9807EC007E863A /* UIView+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
4369C2791D9807EC007E863A /* UIView+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 4369C2751D9807EC007E863A /* UIView+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
4369C27E1D9807EC007E863A /* UIView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 4369C2761D9807EC007E863A /* UIView+WebCache.m */; };
|
||||
4369C2801D9807EC007E863A /* UIView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 4369C2761D9807EC007E863A /* UIView+WebCache.m */; };
|
||||
43A918641D8308FE00B3925F /* SDImageCacheConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 43A918621D8308FE00B3925F /* SDImageCacheConfig.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
43A918661D8308FE00B3925F /* SDImageCacheConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 43A918621D8308FE00B3925F /* SDImageCacheConfig.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
43A9186B1D8308FE00B3925F /* SDImageCacheConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 43A918631D8308FE00B3925F /* SDImageCacheConfig.m */; };
|
||||
43A9186D1D8308FE00B3925F /* SDImageCacheConfig.m in Sources */ = {isa = PBXBuildFile; fileRef = 43A918631D8308FE00B3925F /* SDImageCacheConfig.m */; };
|
||||
|
@ -198,8 +210,6 @@
|
|||
4A2CAE361AB4BB7500B6BC39 /* UIImageView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 53922D96148C56230056699D /* UIImageView+WebCache.m */; };
|
||||
4A2CAE371AB4BB7500B6BC39 /* UIView+WebCacheOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = AB615301192DA24600A2D8E9 /* UIView+WebCacheOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
4A2CAE381AB4BB7500B6BC39 /* UIView+WebCacheOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = AB615302192DA24600A2D8E9 /* UIView+WebCacheOperation.m */; };
|
||||
530E49E816464C25002868E7 /* SDWebImageOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 530E49E71646388E002868E7 /* SDWebImageOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
530E49EA16464C7C002868E7 /* SDWebImageDownloaderOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = 530E49E316460AE2002868E7 /* SDWebImageDownloaderOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
530E49EC16464C84002868E7 /* SDWebImageDownloaderOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 530E49E416460AE2002868E7 /* SDWebImageDownloaderOperation.m */; };
|
||||
53406750167780C40042B59E /* SDWebImageCompat.m in Sources */ = {isa = PBXBuildFile; fileRef = 5340674F167780C40042B59E /* SDWebImageCompat.m */; };
|
||||
53761309155AD0D5005750A4 /* SDImageCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 53922D86148C56230056699D /* SDImageCache.m */; };
|
||||
|
@ -211,38 +221,22 @@
|
|||
53761312155AD0D5005750A4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53FB894814D35E9E0020B787 /* UIKit.framework */; };
|
||||
53761313155AD0D5005750A4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53922D72148C55820056699D /* Foundation.framework */; };
|
||||
53761314155AD0D5005750A4 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53FB893F14D35D1A0020B787 /* CoreGraphics.framework */; };
|
||||
53761316155AD0D5005750A4 /* SDImageCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 53922D85148C56230056699D /* SDImageCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
53761318155AD0D5005750A4 /* SDWebImageCompat.h in Headers */ = {isa = PBXBuildFile; fileRef = 53922D88148C56230056699D /* SDWebImageCompat.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
5376131A155AD0D5005750A4 /* SDWebImageDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = 53922D8B148C56230056699D /* SDWebImageDownloader.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
5376131C155AD0D5005750A4 /* SDWebImageManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 53922D8E148C56230056699D /* SDWebImageManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
5376131E155AD0D5005750A4 /* SDWebImagePrefetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 53922D91148C56230056699D /* SDWebImagePrefetcher.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
5376131F155AD0D5005750A4 /* UIButton+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 53922D93148C56230056699D /* UIButton+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
53761320155AD0D5005750A4 /* UIImageView+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 53922D95148C56230056699D /* UIImageView+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
53EDFB8A17623F7C00698166 /* UIImage+MultiFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = 53EDFB8817623F7C00698166 /* UIImage+MultiFormat.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
53EDFB8C17623F7C00698166 /* UIImage+MultiFormat.m in Sources */ = {isa = PBXBuildFile; fileRef = 53EDFB8917623F7C00698166 /* UIImage+MultiFormat.m */; };
|
||||
5D5B9142188EE8DD006D06BD /* NSData+ImageContentType.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D5B9140188EE8DD006D06BD /* NSData+ImageContentType.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
5D5B9145188EE8DD006D06BD /* NSData+ImageContentType.m in Sources */ = {isa = PBXBuildFile; fileRef = 5D5B9141188EE8DD006D06BD /* NSData+ImageContentType.m */; };
|
||||
806BE07C2142C4A200E02143 /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A2CADFF1AB4BB5300B6BC39 /* SDWebImage.framework */; };
|
||||
806BE07E2142C65200E02143 /* SDWebImageMapKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 806BE07D2142C65200E02143 /* SDWebImageMapKit.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
807A12281F89636300EC2A9B /* SDImageCodersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 807A12261F89636300EC2A9B /* SDImageCodersManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
807A122A1F89636300EC2A9B /* SDImageCodersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 807A12261F89636300EC2A9B /* SDImageCodersManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
807A122E1F89636300EC2A9B /* SDImageCodersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 807A12271F89636300EC2A9B /* SDImageCodersManager.m */; };
|
||||
807A12301F89636300EC2A9B /* SDImageCodersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 807A12271F89636300EC2A9B /* SDImageCodersManager.m */; };
|
||||
80B6DF7E2142B43300BCB334 /* NSImage+Compatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 4397D2F41D0DE2DF00BB2784 /* NSImage+Compatibility.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
80B6DF7F2142B43300BCB334 /* NSImage+Compatibility.h in Headers */ = {isa = PBXBuildFile; fileRef = 4397D2F41D0DE2DF00BB2784 /* NSImage+Compatibility.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
80B6DF802142B43A00BCB334 /* SDAnimatedImageRep.h in Headers */ = {isa = PBXBuildFile; fileRef = 320224B9203979BA00E9F285 /* SDAnimatedImageRep.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
80B6DF812142B43B00BCB334 /* SDAnimatedImageRep.h in Headers */ = {isa = PBXBuildFile; fileRef = 320224B9203979BA00E9F285 /* SDAnimatedImageRep.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
80B6DF822142B44400BCB334 /* NSButton+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 321DB3602011D4D60015D2CB /* NSButton+WebCache.m */; };
|
||||
80B6DF832142B44500BCB334 /* NSButton+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 321DB3602011D4D60015D2CB /* NSButton+WebCache.m */; };
|
||||
80B6DF842142B44600BCB334 /* NSButton+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 321DB35F2011D4D60015D2CB /* NSButton+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
80B6DF852142B44700BCB334 /* NSButton+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 321DB35F2011D4D60015D2CB /* NSButton+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
80B6DFA72142B71600BCB334 /* MKAnnotationView+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 32FDE87A2088871B008D7530 /* MKAnnotationView+WebCache.m */; };
|
||||
80B6DFCD2142B71600BCB334 /* MKAnnotationView+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 32FDE87B2088871B008D7530 /* MKAnnotationView+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
A18A6CC7172DC28500419892 /* UIImage+GIF.h in Headers */ = {isa = PBXBuildFile; fileRef = A18A6CC5172DC28500419892 /* UIImage+GIF.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
A18A6CC9172DC28500419892 /* UIImage+GIF.m in Sources */ = {isa = PBXBuildFile; fileRef = A18A6CC6172DC28500419892 /* UIImage+GIF.m */; };
|
||||
AB615303192DA24600A2D8E9 /* UIView+WebCacheOperation.h in Headers */ = {isa = PBXBuildFile; fileRef = AB615301192DA24600A2D8E9 /* UIView+WebCacheOperation.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
AB615306192DA24600A2D8E9 /* UIView+WebCacheOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = AB615302192DA24600A2D8E9 /* UIView+WebCacheOperation.m */; };
|
||||
ABBE71A718C43B4D00B75E91 /* UIImageView+HighlightedWebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = ABBE71A518C43B4D00B75E91 /* UIImageView+HighlightedWebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
ABBE71A818C43B4D00B75E91 /* UIImageView+HighlightedWebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = ABBE71A618C43B4D00B75E91 /* UIImageView+HighlightedWebCache.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
|
@ -256,6 +250,70 @@
|
|||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
326C15A122A4E8AD0001F663 /* Copy Headers */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = include/SDWebImage;
|
||||
dstSubfolderSpec = 16;
|
||||
files = (
|
||||
32E5690822B1FFCA00CBABC6 /* SDWebImageOptionsProcessor.h in Copy Headers */,
|
||||
32935D2F22A4FEE50049C068 /* SDWebImage.h in Copy Headers */,
|
||||
32935CFE22A4FEDE0049C068 /* SDWebImageManager.h in Copy Headers */,
|
||||
32935CFF22A4FEDE0049C068 /* SDWebImageCacheKeyFilter.h in Copy Headers */,
|
||||
32935D0022A4FEDE0049C068 /* SDWebImageCacheSerializer.h in Copy Headers */,
|
||||
32935D0122A4FEDE0049C068 /* SDWebImageDownloader.h in Copy Headers */,
|
||||
32935D0222A4FEDE0049C068 /* SDWebImageDownloaderOperation.h in Copy Headers */,
|
||||
32935D0322A4FEDE0049C068 /* SDWebImageDownloaderConfig.h in Copy Headers */,
|
||||
32935D0422A4FEDE0049C068 /* SDWebImageDownloaderRequestModifier.h in Copy Headers */,
|
||||
32935D0522A4FEDE0049C068 /* SDImageLoader.h in Copy Headers */,
|
||||
32935D0622A4FEDE0049C068 /* SDImageLoadersManager.h in Copy Headers */,
|
||||
32935D0722A4FEDE0049C068 /* SDImageCache.h in Copy Headers */,
|
||||
32935D0822A4FEDE0049C068 /* SDImageCacheConfig.h in Copy Headers */,
|
||||
32935D0922A4FEDE0049C068 /* SDMemoryCache.h in Copy Headers */,
|
||||
32935D0A22A4FEDE0049C068 /* SDDiskCache.h in Copy Headers */,
|
||||
32935D0B22A4FEDE0049C068 /* SDImageCacheDefine.h in Copy Headers */,
|
||||
32935D0C22A4FEDE0049C068 /* SDImageCachesManager.h in Copy Headers */,
|
||||
32935D0D22A4FEDE0049C068 /* SDImageCodersManager.h in Copy Headers */,
|
||||
32935D0E22A4FEDE0049C068 /* SDImageCoder.h in Copy Headers */,
|
||||
32935D0F22A4FEDE0049C068 /* SDImageIOCoder.h in Copy Headers */,
|
||||
32935D1022A4FEDE0049C068 /* SDImageGIFCoder.h in Copy Headers */,
|
||||
32935D1122A4FEDE0049C068 /* SDImageAPNGCoder.h in Copy Headers */,
|
||||
32935D1222A4FEDE0049C068 /* SDImageFrame.h in Copy Headers */,
|
||||
32935D1322A4FEDE0049C068 /* SDImageCoderHelper.h in Copy Headers */,
|
||||
32935D1422A4FEDE0049C068 /* SDImageGraphics.h in Copy Headers */,
|
||||
32935D1522A4FEDE0049C068 /* SDWebImagePrefetcher.h in Copy Headers */,
|
||||
32935D1622A4FEDE0049C068 /* SDImageTransformer.h in Copy Headers */,
|
||||
32935D1722A4FEDE0049C068 /* SDAnimatedImage.h in Copy Headers */,
|
||||
32935D1822A4FEDE0049C068 /* SDAnimatedImageView.h in Copy Headers */,
|
||||
32935D1922A4FEDE0049C068 /* SDAnimatedImageView+WebCache.h in Copy Headers */,
|
||||
32935D1A22A4FEDE0049C068 /* SDAnimatedImageRep.h in Copy Headers */,
|
||||
32935D1B22A4FEDE0049C068 /* SDWebImageCompat.h in Copy Headers */,
|
||||
32935D1C22A4FEDE0049C068 /* SDWebImageError.h in Copy Headers */,
|
||||
32935D1D22A4FEDE0049C068 /* SDWebImageOperation.h in Copy Headers */,
|
||||
32935D1E22A4FEDE0049C068 /* SDWebImageDefine.h in Copy Headers */,
|
||||
32935D1F22A4FEDE0049C068 /* SDWebImageTransition.h in Copy Headers */,
|
||||
32935D2022A4FEDE0049C068 /* SDWebImageIndicator.h in Copy Headers */,
|
||||
32935D2122A4FEDE0049C068 /* NSData+ImageContentType.h in Copy Headers */,
|
||||
32935D2222A4FEDE0049C068 /* UIImage+GIF.h in Copy Headers */,
|
||||
32935D2322A4FEDE0049C068 /* UIImage+Metadata.h in Copy Headers */,
|
||||
32935D2422A4FEDE0049C068 /* UIImage+MultiFormat.h in Copy Headers */,
|
||||
32935D2522A4FEDE0049C068 /* UIImage+ForceDecode.h in Copy Headers */,
|
||||
32935D2622A4FEDE0049C068 /* UIImage+Transform.h in Copy Headers */,
|
||||
32935D2722A4FEDE0049C068 /* UIImage+MemoryCacheCost.h in Copy Headers */,
|
||||
32935D2822A4FEDE0049C068 /* NSImage+Compatibility.h in Copy Headers */,
|
||||
32935D2922A4FEDE0049C068 /* UIView+WebCacheOperation.h in Copy Headers */,
|
||||
32935D2A22A4FEDE0049C068 /* NSButton+WebCache.h in Copy Headers */,
|
||||
32935D2B22A4FEDE0049C068 /* UIButton+WebCache.h in Copy Headers */,
|
||||
32935D2C22A4FEDE0049C068 /* UIImageView+HighlightedWebCache.h in Copy Headers */,
|
||||
32935D2D22A4FEDE0049C068 /* UIImageView+WebCache.h in Copy Headers */,
|
||||
32935D2E22A4FEDE0049C068 /* UIView+WebCache.h in Copy Headers */,
|
||||
);
|
||||
name = "Copy Headers";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
320224B9203979BA00E9F285 /* SDAnimatedImageRep.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDAnimatedImageRep.h; sourceTree = "<group>"; };
|
||||
320224BA203979BA00E9F285 /* SDAnimatedImageRep.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDAnimatedImageRep.m; sourceTree = "<group>"; };
|
||||
|
@ -275,6 +333,8 @@
|
|||
321E60A11F38E8F600405457 /* SDImageGIFCoder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDImageGIFCoder.m; sourceTree = "<group>"; };
|
||||
321E60BC1F38E91700405457 /* UIImage+ForceDecode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+ForceDecode.h"; sourceTree = "<group>"; };
|
||||
321E60BD1F38E91700405457 /* UIImage+ForceDecode.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ForceDecode.m"; sourceTree = "<group>"; };
|
||||
324406292296C5F400A36084 /* SDWebImageOptionsProcessor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDWebImageOptionsProcessor.h; sourceTree = "<group>"; };
|
||||
3244062A2296C5F400A36084 /* SDWebImageOptionsProcessor.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDWebImageOptionsProcessor.m; sourceTree = "<group>"; };
|
||||
32484757201775F600AF9E5A /* SDAnimatedImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDAnimatedImageView.m; sourceTree = "<group>"; };
|
||||
32484758201775F600AF9E5A /* SDAnimatedImageView+WebCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SDAnimatedImageView+WebCache.h"; sourceTree = "<group>"; };
|
||||
32484759201775F600AF9E5A /* SDAnimatedImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDAnimatedImageView.h; sourceTree = "<group>"; };
|
||||
|
@ -338,7 +398,6 @@
|
|||
32F7C07D2030719600873181 /* UIImage+Transform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+Transform.h"; sourceTree = "<group>"; };
|
||||
32FDE87A2088871B008D7530 /* MKAnnotationView+WebCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MKAnnotationView+WebCache.m"; sourceTree = "<group>"; };
|
||||
32FDE87B2088871B008D7530 /* MKAnnotationView+WebCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MKAnnotationView+WebCache.h"; sourceTree = "<group>"; };
|
||||
32FDE8A4208887A6008D7530 /* SDWebImage.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = SDWebImage.modulemap; sourceTree = "<group>"; };
|
||||
4369C2751D9807EC007E863A /* UIView+WebCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIView+WebCache.h"; path = "SDWebImage/UIView+WebCache.h"; sourceTree = "<group>"; };
|
||||
4369C2761D9807EC007E863A /* UIView+WebCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIView+WebCache.m"; path = "SDWebImage/UIView+WebCache.m"; sourceTree = "<group>"; };
|
||||
4397D2F41D0DE2DF00BB2784 /* NSImage+Compatibility.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSImage+Compatibility.h"; sourceTree = "<group>"; };
|
||||
|
@ -465,6 +524,8 @@
|
|||
328BB69B2081FED200760D6C /* SDWebImageCacheKeyFilter.m */,
|
||||
328BB6A82081FEE500760D6C /* SDWebImageCacheSerializer.h */,
|
||||
328BB6A92081FEE500760D6C /* SDWebImageCacheSerializer.m */,
|
||||
324406292296C5F400A36084 /* SDWebImageOptionsProcessor.h */,
|
||||
3244062A2296C5F400A36084 /* SDWebImageOptionsProcessor.m */,
|
||||
);
|
||||
name = Manager;
|
||||
sourceTree = "<group>";
|
||||
|
@ -552,7 +613,6 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
4A2CAE021AB4BB5400B6BC39 /* Info.plist */,
|
||||
32FDE8A4208887A6008D7530 /* SDWebImage.modulemap */,
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
|
@ -728,6 +788,7 @@
|
|||
329F1237223FAA3B00B309FD /* SDmetamacros.h in Headers */,
|
||||
324DF4B6200A14DC008A84CC /* SDWebImageDefine.h in Headers */,
|
||||
807A122A1F89636300EC2A9B /* SDImageCodersManager.h in Headers */,
|
||||
3244062C2296C5F400A36084 /* SDWebImageOptionsProcessor.h in Headers */,
|
||||
4A2CAE211AB4BB7000B6BC39 /* SDWebImageManager.h in Headers */,
|
||||
4A2CAE1F1AB4BB6C00B6BC39 /* SDImageCache.h in Headers */,
|
||||
4A2CAE351AB4BB7500B6BC39 /* UIImageView+WebCache.h in Headers */,
|
||||
|
@ -770,73 +831,6 @@
|
|||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
53761315155AD0D5005750A4 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
32B5CC62222F89F6005EB74E /* SDAsyncBlockOperation.h in Headers */,
|
||||
32CF1C071FA496B000004BD1 /* SDImageCoderHelper.h in Headers */,
|
||||
32F7C0842030719600873181 /* UIImage+Transform.h in Headers */,
|
||||
3257EAF921898AED0097B271 /* SDImageGraphics.h in Headers */,
|
||||
32D3CDD021DDE87300C4DB49 /* UIImage+MemoryCacheCost.h in Headers */,
|
||||
53761316155AD0D5005750A4 /* SDImageCache.h in Headers */,
|
||||
325C46262233A0A8004CAE11 /* NSBezierPath+RoundedCorners.h in Headers */,
|
||||
325312C8200F09910046BF1E /* SDWebImageTransition.h in Headers */,
|
||||
32C0FDE12013426C001B8F2D /* SDWebImageIndicator.h in Headers */,
|
||||
321E60A21F38E8F600405457 /* SDImageGIFCoder.h in Headers */,
|
||||
5D5B9142188EE8DD006D06BD /* NSData+ImageContentType.h in Headers */,
|
||||
328BB6C12082581100760D6C /* SDDiskCache.h in Headers */,
|
||||
53761318155AD0D5005750A4 /* SDWebImageCompat.h in Headers */,
|
||||
325C460222339330004CAE11 /* SDImageAssetManager.h in Headers */,
|
||||
3290FA041FA478AF0047D20C /* SDImageFrame.h in Headers */,
|
||||
80B6DF852142B44700BCB334 /* NSButton+WebCache.h in Headers */,
|
||||
807A12281F89636300EC2A9B /* SDImageCodersManager.h in Headers */,
|
||||
32B9B537206ED4230026769D /* SDWebImageDownloaderConfig.h in Headers */,
|
||||
329F1236223FAA3B00B309FD /* SDmetamacros.h in Headers */,
|
||||
32484775201775F600AF9E5A /* SDAnimatedImage.h in Headers */,
|
||||
321E60941F38E8ED00405457 /* SDImageIOCoder.h in Headers */,
|
||||
329A18591FFF5DFD008C9A2F /* UIImage+Metadata.h in Headers */,
|
||||
32D122302080B2EB003685A3 /* SDImageCachesManager.h in Headers */,
|
||||
5376131A155AD0D5005750A4 /* SDWebImageDownloader.h in Headers */,
|
||||
328BB6CD2082581100760D6C /* SDMemoryCache.h in Headers */,
|
||||
4369C2771D9807EC007E863A /* UIView+WebCache.h in Headers */,
|
||||
328BB6AA2081FEE500760D6C /* SDWebImageCacheSerializer.h in Headers */,
|
||||
32F21B5120788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.h in Headers */,
|
||||
5376131C155AD0D5005750A4 /* SDWebImageManager.h in Headers */,
|
||||
321E60BE1F38E91700405457 /* UIImage+ForceDecode.h in Headers */,
|
||||
5376131E155AD0D5005750A4 /* SDWebImagePrefetcher.h in Headers */,
|
||||
32F7C06F2030114C00873181 /* SDImageTransformer.h in Headers */,
|
||||
325C460E223394D8004CAE11 /* SDImageCachesManagerOperation.h in Headers */,
|
||||
325C461A22339B5F004CAE11 /* SDImageAPNGCoderInternal.h in Headers */,
|
||||
321B378D2083290E00C0EA77 /* SDImageLoadersManager.h in Headers */,
|
||||
32FDE8A220888789008D7530 /* SDWebImage.h in Headers */,
|
||||
324DF4B4200A14DC008A84CC /* SDWebImageDefine.h in Headers */,
|
||||
5376131F155AD0D5005750A4 /* UIButton+WebCache.h in Headers */,
|
||||
325C460822339426004CAE11 /* SDWeakProxy.h in Headers */,
|
||||
80B6DF802142B43A00BCB334 /* SDAnimatedImageRep.h in Headers */,
|
||||
327054D4206CD8B3006EA328 /* SDImageAPNGCoder.h in Headers */,
|
||||
325C46202233A02E004CAE11 /* UIColor+HexString.h in Headers */,
|
||||
53761320155AD0D5005750A4 /* UIImageView+WebCache.h in Headers */,
|
||||
328BB69C2081FED200760D6C /* SDWebImageCacheKeyFilter.h in Headers */,
|
||||
530E49E816464C25002868E7 /* SDWebImageOperation.h in Headers */,
|
||||
32484769201775F600AF9E5A /* SDAnimatedImageView.h in Headers */,
|
||||
530E49EA16464C7C002868E7 /* SDWebImageDownloaderOperation.h in Headers */,
|
||||
ABBE71A718C43B4D00B75E91 /* UIImageView+HighlightedWebCache.h in Headers */,
|
||||
320CAE152086F50500CFFC80 /* SDWebImageError.h in Headers */,
|
||||
321B37812083290E00C0EA77 /* SDImageLoader.h in Headers */,
|
||||
325C4614223399F7004CAE11 /* SDImageGIFCoderInternal.h in Headers */,
|
||||
321E60861F38E8C800405457 /* SDImageCoder.h in Headers */,
|
||||
32484763201775F600AF9E5A /* SDAnimatedImageView+WebCache.h in Headers */,
|
||||
329F1242223FAD3400B309FD /* SDInternalMacros.h in Headers */,
|
||||
80B6DF7E2142B43300BCB334 /* NSImage+Compatibility.h in Headers */,
|
||||
32D1221E2080B2EB003685A3 /* SDImageCacheDefine.h in Headers */,
|
||||
AB615303192DA24600A2D8E9 /* UIView+WebCacheOperation.h in Headers */,
|
||||
A18A6CC7172DC28500419892 /* UIImage+GIF.h in Headers */,
|
||||
53EDFB8A17623F7C00698166 /* UIImage+MultiFormat.h in Headers */,
|
||||
43A918641D8308FE00B3925F /* SDImageCacheConfig.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
80B6DFB82142B71600BCB334 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
|
@ -873,7 +867,7 @@
|
|||
buildPhases = (
|
||||
53761308155AD0D5005750A4 /* Sources */,
|
||||
53761311155AD0D5005750A4 /* Frameworks */,
|
||||
53761315155AD0D5005750A4 /* Headers */,
|
||||
326C15A122A4E8AD0001F663 /* Copy Headers */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
|
@ -963,6 +957,7 @@
|
|||
3290FA0C1FA478AF0047D20C /* SDImageFrame.m in Sources */,
|
||||
325C46232233A02E004CAE11 /* UIColor+HexString.m in Sources */,
|
||||
321E60C61F38E91700405457 /* UIImage+ForceDecode.m in Sources */,
|
||||
3244062E2296C5F400A36084 /* SDWebImageOptionsProcessor.m in Sources */,
|
||||
328BB6A42081FED200760D6C /* SDWebImageCacheKeyFilter.m in Sources */,
|
||||
4A2CAE2E1AB4BB7500B6BC39 /* UIImage+GIF.m in Sources */,
|
||||
80B6DF822142B44400BCB334 /* NSButton+WebCache.m in Sources */,
|
||||
|
@ -1025,6 +1020,7 @@
|
|||
3290FA0A1FA478AF0047D20C /* SDImageFrame.m in Sources */,
|
||||
325C46222233A02E004CAE11 /* UIColor+HexString.m in Sources */,
|
||||
321E60C41F38E91700405457 /* UIImage+ForceDecode.m in Sources */,
|
||||
3244062D2296C5F400A36084 /* SDWebImageOptionsProcessor.m in Sources */,
|
||||
328BB6A22081FED200760D6C /* SDWebImageCacheKeyFilter.m in Sources */,
|
||||
53761309155AD0D5005750A4 /* SDImageCache.m in Sources */,
|
||||
80B6DF832142B44500BCB334 /* NSButton+WebCache.m in Sources */,
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
location = "group:Docs">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Tests/Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
<FileRef
|
||||
location = "group:Examples/Pods/Pods.xcodeproj">
|
||||
location = "group:Pods/Pods.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#import "objc/runtime.h"
|
||||
#import "UIView+WebCacheOperation.h"
|
||||
#import "UIView+WebCache.h"
|
||||
#import "SDInternalMacros.h"
|
||||
|
||||
@implementation MKAnnotationView (WebCache)
|
||||
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
|
||||
#import "SDWebImageManager.h"
|
||||
|
||||
/**
|
||||
* Integrates SDWebImage async downloading and caching of remote images with NSButton.
|
||||
*/
|
||||
@interface NSButton (WebCache)
|
||||
|
||||
#pragma mark - Image
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#import "objc/runtime.h"
|
||||
#import "UIView+WebCacheOperation.h"
|
||||
#import "UIView+WebCache.h"
|
||||
#import "SDInternalMacros.h"
|
||||
|
||||
static NSString * const SDAlternateImageOperationKey = @"NSButtonAlternateImageOperation";
|
||||
|
||||
|
|
|
@ -24,6 +24,9 @@ static const SDImageFormat SDImageFormatWebP = 4;
|
|||
static const SDImageFormat SDImageFormatHEIC = 5;
|
||||
static const SDImageFormat SDImageFormatHEIF = 6;
|
||||
|
||||
/**
|
||||
NSData category about the image content type and UTI.
|
||||
*/
|
||||
@interface NSData (ImageContentType)
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,10 +8,11 @@
|
|||
|
||||
#import "SDWebImageCompat.h"
|
||||
|
||||
// This category is provided to easily write cross-platform(AppKit/UIKit) code. For common usage, see `UIImage+Metadata.h`.
|
||||
|
||||
#if SD_MAC
|
||||
|
||||
/**
|
||||
This category is provided to easily write cross-platform(AppKit/UIKit) code. For common usage, see `UIImage+Metadata.h`.
|
||||
*/
|
||||
@interface NSImage (Compatibility)
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
#import "SDImageAssetManager.h"
|
||||
#import "SDInternalMacros.h"
|
||||
|
||||
static NSArray *SDBundlePreferredScales() {
|
||||
static NSArray *scales;
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
|
||||
#import "SDImageCachesManagerOperation.h"
|
||||
#import "SDInternalMacros.h"
|
||||
|
||||
@implementation SDImageCachesManagerOperation
|
||||
{
|
||||
|
|
|
@ -59,6 +59,9 @@
|
|||
|
||||
@end
|
||||
|
||||
/**
|
||||
The image class which supports animating on `SDAnimatedImageView`. You can also use it on normal UIImageView/NSImageView.
|
||||
*/
|
||||
@interface SDAnimatedImage : UIImage <SDAnimatedImage>
|
||||
|
||||
// This class override these methods from UIImage(NSImage), and it supports NSSecureCoding.
|
||||
|
@ -82,8 +85,8 @@
|
|||
@property (nonatomic, assign, readonly) SDImageFormat animatedImageFormat;
|
||||
|
||||
/**
|
||||
Current animated image data, you can use this instead of CGImage to create another instance.
|
||||
If the current image is not animated image, this value is nil.
|
||||
Current animated image data, you can use this to grab the compressed format data and create another animated image instance.
|
||||
If this image instance is an animated image created by using animated image coder (which means using the API listed above or using `initWithAnimatedCoder:scale:`), this property is non-nil.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nullable) NSData *animatedImageData;
|
||||
|
||||
|
|
|
@ -10,10 +10,11 @@
|
|||
|
||||
#if SD_MAC
|
||||
|
||||
// A subclass of `NSBitmapImageRep` to fix that GIF loop count issue because `NSBitmapImageRep` will reset `NSImageCurrentFrameDuration` by using `kCGImagePropertyGIFDelayTime` but not `kCGImagePropertyGIFUnclampedDelayTime`.
|
||||
// Built in GIF coder use this instead of `NSBitmapImageRep` for better GIF rendering. If you do not want this, only enable `SDImageIOCoder`, which just call `NSImage` API and actually use `NSBitmapImageRep` for GIF image.
|
||||
// This also support APNG format using `SDImageAPNGCoder`. Which provide full alpha-channel support and the correct duration match the `kCGImagePropertyAPNGUnclampedDelayTime`.
|
||||
|
||||
/**
|
||||
A subclass of `NSBitmapImageRep` to fix that GIF loop count issue because `NSBitmapImageRep` will reset `NSImageCurrentFrameDuration` by using `kCGImagePropertyGIFDelayTime` but not `kCGImagePropertyGIFUnclampedDelayTime`.
|
||||
Built in GIF coder use this instead of `NSBitmapImageRep` for better GIF rendering. If you do not want this, only enable `SDImageIOCoder`, which just call `NSImage` API and actually use `NSBitmapImageRep` for GIF image.
|
||||
This also support APNG format using `SDImageAPNGCoder`. Which provide full alpha-channel support and the correct duration match the `kCGImagePropertyAPNGUnclampedDelayTime`.
|
||||
*/
|
||||
@interface SDAnimatedImageRep : NSBitmapImageRep
|
||||
|
||||
@end
|
||||
|
|
|
@ -13,13 +13,16 @@
|
|||
#import "SDImageGIFCoderInternal.h"
|
||||
#import "SDImageAPNGCoderInternal.h"
|
||||
|
||||
@interface SDAnimatedImageRep ()
|
||||
@implementation SDAnimatedImageRep {
|
||||
CGImageSourceRef _imageSource;
|
||||
}
|
||||
|
||||
@property (nonatomic, assign, readonly, nullable) CGImageSourceRef imageSource;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SDAnimatedImageRep
|
||||
- (void)dealloc {
|
||||
if (_imageSource) {
|
||||
CFRelease(_imageSource);
|
||||
_imageSource = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
// `NSBitmapImageRep`'s `imageRepWithData:` is not designed initlizer
|
||||
+ (instancetype)imageRepWithData:(NSData *)data {
|
||||
|
@ -31,10 +34,11 @@
|
|||
- (instancetype)initWithData:(NSData *)data {
|
||||
self = [super initWithData:data];
|
||||
if (self) {
|
||||
CGImageSourceRef imageSource = self.imageSource;
|
||||
CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef) data, NULL);
|
||||
if (!imageSource) {
|
||||
return self;
|
||||
}
|
||||
_imageSource = imageSource;
|
||||
NSUInteger frameCount = CGImageSourceGetCount(imageSource);
|
||||
if (frameCount <= 1) {
|
||||
return self;
|
||||
|
@ -63,7 +67,7 @@
|
|||
[super setProperty:property withValue:value];
|
||||
if ([property isEqualToString:NSImageCurrentFrame]) {
|
||||
// Access the image source
|
||||
CGImageSourceRef imageSource = self.imageSource;
|
||||
CGImageSourceRef imageSource = _imageSource;
|
||||
if (!imageSource) {
|
||||
return;
|
||||
}
|
||||
|
@ -89,16 +93,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (CGImageSourceRef)imageSource {
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||
if (_tiffData) {
|
||||
return (__bridge CGImageSourceRef)(_tiffData);
|
||||
}
|
||||
#pragma GCC diagnostic pop
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#endif
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
|
||||
#import "SDWebImageManager.h"
|
||||
|
||||
/**
|
||||
Integrates SDWebImage async downloading and caching of remote images with SDAnimatedImageView.
|
||||
*/
|
||||
@interface SDAnimatedImageView (WebCache)
|
||||
|
||||
/**
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#import "UIImage+Metadata.h"
|
||||
#import "NSImage+Compatibility.h"
|
||||
#import "SDWeakProxy.h"
|
||||
#import "SDInternalMacros.h"
|
||||
#import <mach/mach.h>
|
||||
#import <objc/runtime.h>
|
||||
|
||||
|
@ -39,7 +40,10 @@ static NSUInteger SDDeviceFreeMemory() {
|
|||
return vm_stat.free_count * page_size;
|
||||
}
|
||||
|
||||
@interface SDAnimatedImageView () <CALayerDelegate>
|
||||
@interface SDAnimatedImageView () <CALayerDelegate> {
|
||||
NSRunLoopMode _runLoopMode;
|
||||
BOOL _initFinished; // Extra flag to mark the `commonInit` is called
|
||||
}
|
||||
|
||||
@property (nonatomic, strong, readwrite) UIImage *currentFrame;
|
||||
@property (nonatomic, assign, readwrite) NSUInteger currentFrameIndex;
|
||||
|
@ -122,9 +126,10 @@ static NSUInteger SDDeviceFreeMemory() {
|
|||
|
||||
- (void)commonInit
|
||||
{
|
||||
// Pay attention that UIKit's `initWithImage:` will trigger a `setImage:` during initialization before this `commonInit`.
|
||||
// So the properties which rely on this order, should using lazy-evaluation or do extra check in `setImage:`.
|
||||
self.shouldCustomLoopCount = NO;
|
||||
self.shouldIncrementalLoad = YES;
|
||||
self.lock = dispatch_semaphore_create(1);
|
||||
#if SD_MAC
|
||||
self.wantsLayer = YES;
|
||||
// Default value from `NSImageView`
|
||||
|
@ -133,9 +138,10 @@ static NSUInteger SDDeviceFreeMemory() {
|
|||
self.imageAlignment = NSImageAlignCenter;
|
||||
#endif
|
||||
#if SD_UIKIT
|
||||
self.runLoopMode = [[self class] defaultRunLoopMode];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveMemoryWarning:) name:UIApplicationDidReceiveMemoryWarningNotification object:nil];
|
||||
#endif
|
||||
// Mark commonInit finished
|
||||
_initFinished = YES;
|
||||
}
|
||||
|
||||
- (void)resetAnimatedImage
|
||||
|
@ -239,17 +245,38 @@ static NSUInteger SDDeviceFreeMemory() {
|
|||
}
|
||||
|
||||
#if SD_UIKIT
|
||||
- (void)setRunLoopMode:(NSString *)runLoopMode
|
||||
- (void)setRunLoopMode:(NSRunLoopMode)runLoopMode
|
||||
{
|
||||
if (![@[NSDefaultRunLoopMode, NSRunLoopCommonModes] containsObject:runLoopMode]) {
|
||||
NSAssert(NO, @"Invalid run loop mode: %@", runLoopMode);
|
||||
_runLoopMode = [[self class] defaultRunLoopMode];
|
||||
} else {
|
||||
_runLoopMode = runLoopMode;
|
||||
if ([_runLoopMode isEqual:runLoopMode]) {
|
||||
return;
|
||||
}
|
||||
if (_displayLink) {
|
||||
if (_runLoopMode) {
|
||||
[_displayLink removeFromRunLoop:[NSRunLoop mainRunLoop] forMode:_runLoopMode];
|
||||
}
|
||||
if (runLoopMode.length > 0) {
|
||||
[_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:runLoopMode];
|
||||
}
|
||||
}
|
||||
_runLoopMode = [runLoopMode copy];
|
||||
}
|
||||
|
||||
- (NSRunLoopMode)runLoopMode
|
||||
{
|
||||
if (!_runLoopMode) {
|
||||
_runLoopMode = [[self class] defaultRunLoopMode];
|
||||
}
|
||||
return _runLoopMode;
|
||||
}
|
||||
#endif
|
||||
|
||||
- (BOOL)shouldIncrementalLoad {
|
||||
if (!_initFinished) {
|
||||
return YES; // Defaults to YES
|
||||
}
|
||||
return _initFinished;
|
||||
}
|
||||
|
||||
#pragma mark - Private
|
||||
- (NSOperationQueue *)fetchQueue
|
||||
{
|
||||
|
@ -268,6 +295,13 @@ static NSUInteger SDDeviceFreeMemory() {
|
|||
return _frameBuffer;
|
||||
}
|
||||
|
||||
- (dispatch_semaphore_t)lock {
|
||||
if (!_lock) {
|
||||
_lock = dispatch_semaphore_create(1);
|
||||
}
|
||||
return _lock;
|
||||
}
|
||||
|
||||
#if SD_MAC
|
||||
- (CVDisplayLinkRef)displayLink
|
||||
{
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
#import "SDWebImageCompat.h"
|
||||
|
||||
@class SDImageCacheConfig;
|
||||
// A protocol to allow custom disk cache used in SDImageCache.
|
||||
/**
|
||||
A protocol to allow custom disk cache used in SDImageCache.
|
||||
*/
|
||||
@protocol SDDiskCache <NSObject>
|
||||
|
||||
// All of these method are called from the same global queue to avoid blocking on main queue and thread-safe problem. But it's also recommend to ensure thread-safe yourself using lock or other ways.
|
||||
|
@ -97,9 +99,13 @@
|
|||
|
||||
@end
|
||||
|
||||
// The built-in disk cache
|
||||
/**
|
||||
The built-in disk cache.
|
||||
*/
|
||||
@interface SDDiskCache : NSObject <SDDiskCache>
|
||||
|
||||
/**
|
||||
Cache Config object - storing all kind of settings.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nonnull) SDImageCacheConfig *config;
|
||||
|
||||
- (nonnull instancetype)init NS_UNAVAILABLE;
|
||||
|
|
|
@ -193,7 +193,8 @@ const CFStringRef kCGImagePropertyAPNGUnclampedDelayTime = (__bridge CFStringRef
|
|||
NSArray<SDImageFrame *> *frames = [SDImageCoderHelper framesFromAnimatedImage:image];
|
||||
|
||||
// Create an image destination. APNG does not support EXIF image orientation
|
||||
CGImageDestinationRef imageDestination = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)imageData, imageUTType, frames.count, NULL);
|
||||
// The `CGImageDestinationCreateWithData` will log a warning when count is 0, use 1 instead.
|
||||
CGImageDestinationRef imageDestination = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)imageData, imageUTType, frames.count ?: 1, NULL);
|
||||
if (!imageDestination) {
|
||||
// Handle failure.
|
||||
return nil;
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#import "SDImageCacheConfig.h"
|
||||
#import "SDImageCacheDefine.h"
|
||||
|
||||
/// Image Cache Options
|
||||
typedef NS_OPTIONS(NSUInteger, SDImageCacheOptions) {
|
||||
/**
|
||||
* By default, we do not query image data when the image is already cached in memory. This mask can force to query image data at the same time. However, this query is asynchronously unless you specify `SDImageCacheQueryMemoryDataSync`
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#import "SDImageCoderHelper.h"
|
||||
#import "SDAnimatedImage.h"
|
||||
#import "UIImage+MemoryCacheCost.h"
|
||||
#import "UIImage+Metadata.h"
|
||||
|
||||
@interface SDImageCache ()
|
||||
|
||||
|
@ -378,6 +379,15 @@
|
|||
|
||||
// First check the in-memory cache...
|
||||
UIImage *image = [self imageFromMemoryCacheForKey:key];
|
||||
|
||||
if ((options & SDImageCacheDecodeFirstFrameOnly) && image.sd_isAnimated) {
|
||||
#if SD_MAC
|
||||
image = [[NSImage alloc] initWithCGImage:image.CGImage scale:image.scale orientation:kCGImagePropertyOrientationUp];
|
||||
#else
|
||||
image = [[UIImage alloc] initWithCGImage:image.CGImage scale:image.scale orientation:image.imageOrientation];
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOL shouldQueryMemoryOnly = (image && !(options & SDImageCacheQueryMemoryData));
|
||||
if (shouldQueryMemoryOnly) {
|
||||
if (doneBlock) {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
#import "SDWebImageCompat.h"
|
||||
|
||||
/// Image Cache Expire Type
|
||||
typedef NS_ENUM(NSUInteger, SDImageCacheConfigExpireType) {
|
||||
/**
|
||||
* When the image is accessed it will update this value
|
||||
|
@ -20,7 +21,10 @@ typedef NS_ENUM(NSUInteger, SDImageCacheConfigExpireType) {
|
|||
SDImageCacheConfigExpireTypeModificationDate
|
||||
};
|
||||
|
||||
// This class conform to NSCopying, make sure to add the property in `copyWithZone:` as well.
|
||||
/**
|
||||
The class contains all the config for image cache
|
||||
@note This class conform to NSCopying, make sure to add the property in `copyWithZone:` as well.
|
||||
*/
|
||||
@interface SDImageCacheConfig : NSObject <NSCopying>
|
||||
|
||||
/**
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#import "SDWebImageOperation.h"
|
||||
#import "SDWebImageDefine.h"
|
||||
|
||||
/// Image Cache Type
|
||||
typedef NS_ENUM(NSInteger, SDImageCacheType) {
|
||||
/**
|
||||
* For query and contains op in response, means the image isn't available in the image cache
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
#import "SDImageCacheDefine.h"
|
||||
|
||||
/// Policy for cache operation
|
||||
typedef NS_ENUM(NSUInteger, SDImageCachesManagerOperationPolicy) {
|
||||
SDImageCachesManagerOperationPolicySerial, // process all caches serially (from the highest priority to the lowest priority cache by order)
|
||||
SDImageCachesManagerOperationPolicyConcurrent, // process all caches concurrently
|
||||
|
@ -16,6 +17,9 @@ typedef NS_ENUM(NSUInteger, SDImageCachesManagerOperationPolicy) {
|
|||
SDImageCachesManagerOperationPolicyLowestOnly // process the lowest priority cache only
|
||||
};
|
||||
|
||||
/**
|
||||
A caches manager to manage multiple caches.
|
||||
*/
|
||||
@interface SDImageCachesManager : NSObject <SDImageCache>
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#import "SDImageCachesManager.h"
|
||||
#import "SDImageCachesManagerOperation.h"
|
||||
#import "SDImageCache.h"
|
||||
#import "SDInternalMacros.h"
|
||||
|
||||
@interface SDImageCachesManager ()
|
||||
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
#import "SDWebImageCompat.h"
|
||||
#import "SDImageFrame.h"
|
||||
|
||||
/**
|
||||
Provide some common helper methods for building the image decoder/encoder.
|
||||
*/
|
||||
@interface SDImageCoderHelper : NSObject
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#import "SDImageIOCoder.h"
|
||||
#import "SDImageGIFCoder.h"
|
||||
#import "SDImageAPNGCoder.h"
|
||||
#import "SDInternalMacros.h"
|
||||
|
||||
@interface SDImageCodersManager ()
|
||||
|
||||
|
|
|
@ -9,10 +9,12 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
#import "SDWebImageCompat.h"
|
||||
|
||||
/**
|
||||
This class is used for creating animated images via `animatedImageWithFrames` in `SDImageCoderHelper`.
|
||||
@note If you need to specify animated images loop count, use `sd_imageLoopCount` property in `UIImage+Metadata.h`.
|
||||
*/
|
||||
@interface SDImageFrame : NSObject
|
||||
|
||||
// This class is used for creating animated images via `animatedImageWithFrames` in `SDImageCoderHelper`. Attention if you need to specify animated images loop count, use `sd_imageLoopCount` property in `UIImage+Metadata.h`.
|
||||
|
||||
/**
|
||||
The image of current frame. You should not set an animated image.
|
||||
*/
|
||||
|
|
|
@ -269,7 +269,8 @@
|
|||
NSArray<SDImageFrame *> *frames = [SDImageCoderHelper framesFromAnimatedImage:image];
|
||||
|
||||
// Create an image destination. GIF does not support EXIF image orientation
|
||||
CGImageDestinationRef imageDestination = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)imageData, imageUTType, frames.count, NULL);
|
||||
// The `CGImageDestinationCreateWithData` will log a warning when count is 0, use 1 instead.
|
||||
CGImageDestinationRef imageDestination = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)imageData, imageUTType, frames.count ?: 1, NULL);
|
||||
if (!imageDestination) {
|
||||
// Handle failure.
|
||||
return nil;
|
||||
|
|
|
@ -14,8 +14,14 @@
|
|||
For UIKit, these methods just call the same method in `UIGraphics.h`. See the documentation for usage.
|
||||
For AppKit, these methods use `NSGraphicsContext` to create image context and match the behavior like UIKit.
|
||||
*/
|
||||
|
||||
/// Returns the current graphics context.
|
||||
FOUNDATION_EXPORT CGContextRef __nullable SDGraphicsGetCurrentContext(void) CF_RETURNS_NOT_RETAINED;
|
||||
/// Creates a bitmap-based graphics context and makes it the current context.
|
||||
FOUNDATION_EXPORT void SDGraphicsBeginImageContext(CGSize size);
|
||||
/// Creates a bitmap-based graphics context with the specified options.
|
||||
FOUNDATION_EXPORT void SDGraphicsBeginImageContextWithOptions(CGSize size, BOOL opaque, CGFloat scale);
|
||||
/// Removes the current bitmap-based graphics context from the top of the stack.
|
||||
FOUNDATION_EXPORT void SDGraphicsEndImageContext(void);
|
||||
/// Returns an image based on the contents of the current bitmap-based graphics context.
|
||||
FOUNDATION_EXPORT UIImage * __nullable SDGraphicsGetImageFromCurrentImageContext(void);
|
||||
|
|
|
@ -52,11 +52,12 @@ FOUNDATION_EXPORT UIImage * _Nullable SDImageLoaderDecodeProgressiveImageData(NS
|
|||
|
||||
#pragma mark - SDImageLoader
|
||||
|
||||
// This is the protocol to specify custom image load process. You can create your own class to conform this protocol and use as a image loader to load image from network or any avaiable remote resources defined by yourself.
|
||||
// If you want to implement custom loader for image download from network or local file, you just need to concentrate on image data download only. After the download finish, call `SDImageLoaderDecodeImageData` or `SDImageLoaderDecodeProgressiveImageData` to use the built-in decoding process and produce image (Remember to call in the global queue). And finally callback the completion block.
|
||||
// If you directlly get the image instance using some third-party SDKs, such as image directlly from Photos framework. You can process the image data and image instance by yourself without that built-in decoding process. And finally callback the completion block.
|
||||
// @note It's your responsibility to load the image in the desired global queue(to avoid block main queue). We do not dispatch these method call in a global queue but just from the call queue (For `SDWebImageManager`, it typically call from the main queue).
|
||||
|
||||
/**
|
||||
This is the protocol to specify custom image load process. You can create your own class to conform this protocol and use as a image loader to load image from network or any avaiable remote resources defined by yourself.
|
||||
If you want to implement custom loader for image download from network or local file, you just need to concentrate on image data download only. After the download finish, call `SDImageLoaderDecodeImageData` or `SDImageLoaderDecodeProgressiveImageData` to use the built-in decoding process and produce image (Remember to call in the global queue). And finally callback the completion block.
|
||||
If you directlly get the image instance using some third-party SDKs, such as image directlly from Photos framework. You can process the image data and image instance by yourself without that built-in decoding process. And finally callback the completion block.
|
||||
@note It's your responsibility to load the image in the desired global queue(to avoid block main queue). We do not dispatch these method call in a global queue but just from the call queue (For `SDWebImageManager`, it typically call from the main queue).
|
||||
*/
|
||||
@protocol SDImageLoader <NSObject>
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
#import "SDImageLoader.h"
|
||||
|
||||
/**
|
||||
A loaders manager to manage multiple loaders
|
||||
*/
|
||||
@interface SDImageLoadersManager : NSObject <SDImageLoader>
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#import "SDImageLoadersManager.h"
|
||||
#import "SDWebImageDownloader.h"
|
||||
#import "SDInternalMacros.h"
|
||||
|
||||
@interface SDImageLoadersManager ()
|
||||
|
||||
|
|
|
@ -47,10 +47,15 @@ FOUNDATION_EXPORT NSString * _Nullable SDTransformedKeyForKey(NSString * _Nullab
|
|||
|
||||
#pragma mark - Pipeline
|
||||
|
||||
// Pipeline transformer. Which you can bind multiple transformers together to let the image to be transformed one by one in order and generate the final image.
|
||||
// Because transformers are lightweight, if you want to append or arrange transfomers, create another pipeline transformer instead. This class is considered as immutable.
|
||||
/**
|
||||
Pipeline transformer. Which you can bind multiple transformers together to let the image to be transformed one by one in order and generate the final image.
|
||||
@note Because transformers are lightweight, if you want to append or arrange transfomers, create another pipeline transformer instead. This class is considered as immutable.
|
||||
*/
|
||||
@interface SDImagePipelineTransformer : NSObject <SDImageTransformer>
|
||||
|
||||
/**
|
||||
All transformers in pipeline
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nonnull) NSArray<id<SDImageTransformer>> *transformers;
|
||||
|
||||
- (nonnull instancetype)init NS_UNAVAILABLE;
|
||||
|
@ -62,12 +67,35 @@ FOUNDATION_EXPORT NSString * _Nullable SDTransformedKeyForKey(NSString * _Nullab
|
|||
// Because transformers are lightweight, these class are considered as immutable.
|
||||
#pragma mark - Image Geometry
|
||||
|
||||
// Image round corner transformer
|
||||
/**
|
||||
Image round corner transformer
|
||||
*/
|
||||
@interface SDImageRoundCornerTransformer: NSObject <SDImageTransformer>
|
||||
|
||||
/**
|
||||
The radius of each corner oval. Values larger than half the
|
||||
rectangle's width or height are clamped appropriately to
|
||||
half the width or height.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) CGFloat cornerRadius;
|
||||
|
||||
/**
|
||||
A bitmask value that identifies the corners that you want
|
||||
rounded. You can use this parameter to round only a subset
|
||||
of the corners of the rectangle.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) SDRectCorner corners;
|
||||
|
||||
/**
|
||||
The inset border line width. Values larger than half the rectangle's
|
||||
width or height are clamped appropriately to half the width
|
||||
or height.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) CGFloat borderWidth;
|
||||
|
||||
/**
|
||||
The border stroke color. nil means clear color.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nullable) UIColor *borderColor;
|
||||
|
||||
- (nonnull instancetype)init NS_UNAVAILABLE;
|
||||
|
@ -75,10 +103,19 @@ FOUNDATION_EXPORT NSString * _Nullable SDTransformedKeyForKey(NSString * _Nullab
|
|||
|
||||
@end
|
||||
|
||||
// Image resizing transformer
|
||||
/**
|
||||
Image resizing transformer
|
||||
*/
|
||||
@interface SDImageResizingTransformer : NSObject <SDImageTransformer>
|
||||
|
||||
/**
|
||||
The new size to be resized, values should be positive.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) CGSize size;
|
||||
|
||||
/**
|
||||
The scale mode for image content.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) SDImageScaleMode scaleMode;
|
||||
|
||||
- (nonnull instancetype)init NS_UNAVAILABLE;
|
||||
|
@ -86,9 +123,14 @@ FOUNDATION_EXPORT NSString * _Nullable SDTransformedKeyForKey(NSString * _Nullab
|
|||
|
||||
@end
|
||||
|
||||
// Image cropping transformer
|
||||
/**
|
||||
Image cropping transformer
|
||||
*/
|
||||
@interface SDImageCroppingTransformer : NSObject <SDImageTransformer>
|
||||
|
||||
/**
|
||||
Image's inner rect.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) CGRect rect;
|
||||
|
||||
- (nonnull instancetype)init NS_UNAVAILABLE;
|
||||
|
@ -96,10 +138,19 @@ FOUNDATION_EXPORT NSString * _Nullable SDTransformedKeyForKey(NSString * _Nullab
|
|||
|
||||
@end
|
||||
|
||||
// Image flipping transformer
|
||||
/**
|
||||
Image flipping transformer
|
||||
*/
|
||||
@interface SDImageFlippingTransformer : NSObject <SDImageTransformer>
|
||||
|
||||
/**
|
||||
YES to flip the image horizontally. ⇋
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) BOOL horizontal;
|
||||
|
||||
/**
|
||||
YES to flip the image vertically. ⥯
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) BOOL vertical;
|
||||
|
||||
- (nonnull instancetype)init NS_UNAVAILABLE;
|
||||
|
@ -107,10 +158,20 @@ FOUNDATION_EXPORT NSString * _Nullable SDTransformedKeyForKey(NSString * _Nullab
|
|||
|
||||
@end
|
||||
|
||||
// Image rotation transformer
|
||||
/**
|
||||
Image rotation transformer
|
||||
*/
|
||||
@interface SDImageRotationTransformer : NSObject <SDImageTransformer>
|
||||
|
||||
/**
|
||||
Rotated radians in counterclockwise.⟲
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) CGFloat angle;
|
||||
|
||||
/**
|
||||
YES: new image's size is extend to fit all content.
|
||||
NO: image's size will not change, content may be clipped.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) BOOL fitSize;
|
||||
|
||||
- (nonnull instancetype)init NS_UNAVAILABLE;
|
||||
|
@ -120,9 +181,14 @@ FOUNDATION_EXPORT NSString * _Nullable SDTransformedKeyForKey(NSString * _Nullab
|
|||
|
||||
#pragma mark - Image Blending
|
||||
|
||||
// Image tint color transformer
|
||||
/**
|
||||
Image tint color transformer
|
||||
*/
|
||||
@interface SDImageTintTransformer : NSObject <SDImageTransformer>
|
||||
|
||||
/**
|
||||
The tint color.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nonnull) UIColor *tintColor;
|
||||
|
||||
- (nonnull instancetype)init NS_UNAVAILABLE;
|
||||
|
@ -132,9 +198,14 @@ FOUNDATION_EXPORT NSString * _Nullable SDTransformedKeyForKey(NSString * _Nullab
|
|||
|
||||
#pragma mark - Image Effect
|
||||
|
||||
// Image blur effect transformer
|
||||
/**
|
||||
Image blur effect transformer
|
||||
*/
|
||||
@interface SDImageBlurTransformer : NSObject <SDImageTransformer>
|
||||
|
||||
/**
|
||||
The radius of the blur in points, 0 means no blur effect.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) CGFloat blurRadius;
|
||||
|
||||
- (nonnull instancetype)init NS_UNAVAILABLE;
|
||||
|
@ -143,9 +214,14 @@ FOUNDATION_EXPORT NSString * _Nullable SDTransformedKeyForKey(NSString * _Nullab
|
|||
@end
|
||||
|
||||
#if SD_UIKIT || SD_MAC
|
||||
// Core Image filter transformer
|
||||
/**
|
||||
Core Image filter transformer
|
||||
*/
|
||||
@interface SDImageFilterTransformer: NSObject <SDImageTransformer>
|
||||
|
||||
/**
|
||||
The CIFilter to be applied to the image.
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nonnull) CIFilter *filter;
|
||||
|
||||
- (nonnull instancetype)init NS_UNAVAILABLE;
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
#import "SDWebImageCompat.h"
|
||||
|
||||
@class SDImageCacheConfig;
|
||||
// A protocol to allow custom memory cache used in SDImageCache.
|
||||
/**
|
||||
A protocol to allow custom memory cache used in SDImageCache.
|
||||
*/
|
||||
@protocol SDMemoryCache <NSObject>
|
||||
|
||||
@required
|
||||
|
@ -65,7 +67,9 @@
|
|||
|
||||
@end
|
||||
|
||||
// A memory cache which auto purge the cache on memory warning and support weak cache.
|
||||
/**
|
||||
A memory cache which auto purge the cache on memory warning and support weak cache.
|
||||
*/
|
||||
@interface SDMemoryCache <KeyType, ObjectType> : NSCache <KeyType, ObjectType> <SDMemoryCache>
|
||||
|
||||
@property (nonatomic, strong, nonnull, readonly) SDImageCacheConfig *config;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#import "SDMemoryCache.h"
|
||||
#import "SDImageCacheConfig.h"
|
||||
#import "UIImage+MemoryCacheCost.h"
|
||||
#import "SDInternalMacros.h"
|
||||
|
||||
static void * SDMemoryCacheContext = &SDMemoryCacheContext;
|
||||
|
||||
|
|
|
@ -11,13 +11,19 @@
|
|||
|
||||
typedef NSString * _Nullable(^SDWebImageCacheKeyFilterBlock)(NSURL * _Nonnull url);
|
||||
|
||||
// This is the protocol for cache key filter. We can use a block to specify the cache key filter. But Using protocol can make this extensible, and allow Swift user to use it easily instead of using `@convention(block)` to store a block into context options.
|
||||
/**
|
||||
This is the protocol for cache key filter.
|
||||
We can use a block to specify the cache key filter. But Using protocol can make this extensible, and allow Swift user to use it easily instead of using `@convention(block)` to store a block into context options.
|
||||
*/
|
||||
@protocol SDWebImageCacheKeyFilter <NSObject>
|
||||
|
||||
- (nullable NSString *)cacheKeyForURL:(nonnull NSURL *)url;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
A cache key filter class with block.
|
||||
*/
|
||||
@interface SDWebImageCacheKeyFilter : NSObject <SDWebImageCacheKeyFilter>
|
||||
|
||||
- (nonnull instancetype)initWithBlock:(nonnull SDWebImageCacheKeyFilterBlock)block;
|
||||
|
|
|
@ -11,13 +11,19 @@
|
|||
|
||||
typedef NSData * _Nullable(^SDWebImageCacheSerializerBlock)(UIImage * _Nonnull image, NSData * _Nullable data, NSURL * _Nullable imageURL);
|
||||
|
||||
// This is the protocol for cache serializer. We can use a block to specify the cache serializer. But Using protocol can make this extensible, and allow Swift user to use it easily instead of using `@convention(block)` to store a block into context options.
|
||||
/**
|
||||
This is the protocol for cache serializer.
|
||||
We can use a block to specify the cache serializer. But Using protocol can make this extensible, and allow Swift user to use it easily instead of using `@convention(block)` to store a block into context options.
|
||||
*/
|
||||
@protocol SDWebImageCacheSerializer <NSObject>
|
||||
|
||||
- (nullable NSData *)cacheDataWithImage:(nonnull UIImage *)image originalData:(nullable NSData *)data imageURL:(nullable NSURL *)imageURL;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
A cache serializer class with block.
|
||||
*/
|
||||
@interface SDWebImageCacheSerializer : NSObject <SDWebImageCacheSerializer>
|
||||
|
||||
- (nonnull instancetype)initWithBlock:(nonnull SDWebImageCacheSerializerBlock)block;
|
||||
|
|
|
@ -48,6 +48,7 @@ FOUNDATION_EXPORT UIImage * _Nullable SDScaledImageForScaleFactor(CGFloat scale,
|
|||
|
||||
#pragma mark - WebCache Options
|
||||
|
||||
/// WebCache options
|
||||
typedef NS_OPTIONS(NSUInteger, SDWebImageOptions) {
|
||||
/**
|
||||
* By default, when a URL fail to be downloaded, the URL is blacklisted so the library won't keep trying.
|
||||
|
@ -202,11 +203,18 @@ FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextImageT
|
|||
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextImageScaleFactor;
|
||||
|
||||
/**
|
||||
A SDImageCacheType raw value which specify the cache type when the image has just been downloaded and will be stored to the cache. Specify `SDImageCacheTypeNone` to disable cache storage; `SDImageCacheTypeDisk` to store in disk cache only; `SDImageCacheTypeMemory` to store in memory only. And `SDImageCacheTypeAll` to store in both memory cache and disk cache.
|
||||
A SDImageCacheType raw value which specify the store cache type when the image has just been downloaded and will be stored to the cache. Specify `SDImageCacheTypeNone` to disable cache storage; `SDImageCacheTypeDisk` to store in disk cache only; `SDImageCacheTypeMemory` to store in memory only. And `SDImageCacheTypeAll` to store in both memory cache and disk cache.
|
||||
If you use image transformer feature, this actually apply for the transformed image, but not the original image itself. Use `SDWebImageContextOriginalStoreCacheType` if you want to control the original image's store cache type at the same time.
|
||||
If not provide or the value is invalid, we will use `SDImageCacheTypeAll`. (NSNumber)
|
||||
*/
|
||||
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextStoreCacheType;
|
||||
|
||||
/**
|
||||
The same behavior like `SDWebImageContextStoreCacheType`, but control the store cache type for the original image when you use image transformer feature. This allows the detail control of cache storage for these two images. For example, if you want to store the transformed image into both memory/disk cache, store the original image into disk cache only, use `[.storeCacheType : .all, .originalStoreCacheType : .disk]`
|
||||
If not provide or the value is invalid, we will use `SDImageCacheTypeNone`, which does not store the original image into cache. (NSNumber)
|
||||
*/
|
||||
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextOriginalStoreCacheType;
|
||||
|
||||
/**
|
||||
A Class object which the instance is a `UIImage/NSImage` subclass and adopt `SDAnimatedImage` protocol. We will call `initWithData:scale:options:` to create the instance (or `initWithAnimatedCoder:scale:` when using progressive download) . If the instance create failed, fallback to normal `UIImage/NSImage`.
|
||||
This can be used to improve animated images rendering performance (especially memory usage on big animated images) with `SDAnimatedImageView` (Class).
|
||||
|
|
|
@ -98,6 +98,7 @@ inline UIImage * _Nullable SDScaledImageForScaleFactor(CGFloat scale, UIImage *
|
|||
if (bitmapImageRep) {
|
||||
NSSize size = NSMakeSize(image.size.width / scale, image.size.height / scale);
|
||||
animatedImage = [[NSImage alloc] initWithSize:size];
|
||||
bitmapImageRep.size = size;
|
||||
[animatedImage addRepresentation:bitmapImageRep];
|
||||
}
|
||||
#endif
|
||||
|
@ -122,6 +123,7 @@ SDWebImageContextOption const SDWebImageContextCustomManager = @"customManager";
|
|||
SDWebImageContextOption const SDWebImageContextImageTransformer = @"imageTransformer";
|
||||
SDWebImageContextOption const SDWebImageContextImageScaleFactor = @"imageScaleFactor";
|
||||
SDWebImageContextOption const SDWebImageContextStoreCacheType = @"storeCacheType";
|
||||
SDWebImageContextOption const SDWebImageContextOriginalStoreCacheType = @"originalStoreCacheType";
|
||||
SDWebImageContextOption const SDWebImageContextAnimatedImageClass = @"animatedImageClass";
|
||||
SDWebImageContextOption const SDWebImageContextDownloadRequestModifier = @"downloadRequestModifier";
|
||||
SDWebImageContextOption const SDWebImageContextCacheKeyFilter = @"cacheKeyFilter";
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#import "SDWebImageDownloaderRequestModifier.h"
|
||||
#import "SDImageLoader.h"
|
||||
|
||||
/// Downloader options
|
||||
typedef NS_OPTIONS(NSUInteger, SDWebImageDownloaderOptions) {
|
||||
/**
|
||||
* Put the download in the low queue priority and task priority.
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#import "SDWebImageDownloaderConfig.h"
|
||||
#import "SDWebImageDownloaderOperation.h"
|
||||
#import "SDWebImageError.h"
|
||||
#import "SDInternalMacros.h"
|
||||
|
||||
NSNotificationName const SDWebImageDownloadStartNotification = @"SDWebImageDownloadStartNotification";
|
||||
NSNotificationName const SDWebImageDownloadReceiveResponseNotification = @"SDWebImageDownloadReceiveResponseNotification";
|
||||
|
@ -118,7 +119,7 @@ static void * SDWebImageDownloaderContext = &SDWebImageDownloaderContext;
|
|||
}
|
||||
headerDictionary[@"User-Agent"] = userAgent;
|
||||
}
|
||||
headerDictionary[@"Accept"] = @"image/*;q=0.8";
|
||||
headerDictionary[@"Accept"] = @"image/*,*/*;q=0.8";
|
||||
_HTTPHeaders = headerDictionary;
|
||||
_HTTPHeadersLock = dispatch_semaphore_create(1);
|
||||
_operationsLock = dispatch_semaphore_create(1);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
#import "SDWebImageCompat.h"
|
||||
|
||||
/// Operation execution order
|
||||
typedef NS_ENUM(NSInteger, SDWebImageDownloaderExecutionOrder) {
|
||||
/**
|
||||
* Default value. All download operations will execute in queue style (first-in-first-out).
|
||||
|
@ -21,6 +22,10 @@ typedef NS_ENUM(NSInteger, SDWebImageDownloaderExecutionOrder) {
|
|||
SDWebImageDownloaderLIFOExecutionOrder
|
||||
};
|
||||
|
||||
/**
|
||||
The class contains all the config for image downloader
|
||||
@note This class conform to NSCopying, make sure to add the property in `copyWithZone:` as well.
|
||||
*/
|
||||
@interface SDWebImageDownloaderConfig : NSObject <NSCopying>
|
||||
|
||||
/**
|
||||
|
|
|
@ -42,6 +42,9 @@
|
|||
@end
|
||||
|
||||
|
||||
/**
|
||||
The download operation class for SDWebImageDownloader.
|
||||
*/
|
||||
@interface SDWebImageDownloaderOperation : NSOperation <SDWebImageDownloaderOperation>
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#import "SDWebImageDownloaderOperation.h"
|
||||
#import "SDWebImageError.h"
|
||||
#import "SDInternalMacros.h"
|
||||
|
||||
// iOS 8 Foundation.framework extern these symbol but the define is in CFNetwork.framework. We just fix this without import CFNetwork.framework
|
||||
#if (__IPHONE_OS_VERSION_MIN_REQUIRED && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_9_0)
|
||||
|
@ -180,16 +181,11 @@ typedef NSMutableDictionary<NSString *, id> SDCallbacksDictionary;
|
|||
}
|
||||
|
||||
if (self.dataTask) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunguarded-availability"
|
||||
if ([self.dataTask respondsToSelector:@selector(setPriority:)]) {
|
||||
if (self.options & SDWebImageDownloaderHighPriority) {
|
||||
self.dataTask.priority = NSURLSessionTaskPriorityHigh;
|
||||
} else if (self.options & SDWebImageDownloaderLowPriority) {
|
||||
self.dataTask.priority = NSURLSessionTaskPriorityLow;
|
||||
}
|
||||
if (self.options & SDWebImageDownloaderHighPriority) {
|
||||
self.dataTask.priority = NSURLSessionTaskPriorityHigh;
|
||||
} else if (self.options & SDWebImageDownloaderLowPriority) {
|
||||
self.dataTask.priority = NSURLSessionTaskPriorityLow;
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
[self.dataTask resume];
|
||||
for (SDWebImageDownloaderProgressBlock progressBlock in [self callbacksForKey:kProgressCallbackKey]) {
|
||||
progressBlock(0, NSURLResponseUnknownLength, self.request.URL);
|
||||
|
|
|
@ -11,13 +11,19 @@
|
|||
|
||||
typedef NSURLRequest * _Nullable (^SDWebImageDownloaderRequestModifierBlock)(NSURLRequest * _Nonnull request);
|
||||
|
||||
// This is the protocol for downloader request modifier. We can use a block to specify the downloader request modifier. But Using protocol can make this extensible, and allow Swift user to use it easily instead of using `@convention(block)` to store a block into context options.
|
||||
/**
|
||||
This is the protocol for downloader request modifier.
|
||||
We can use a block to specify the downloader request modifier. But Using protocol can make this extensible, and allow Swift user to use it easily instead of using `@convention(block)` to store a block into context options.
|
||||
*/
|
||||
@protocol SDWebImageDownloaderRequestModifier <NSObject>
|
||||
|
||||
- (nullable NSURLRequest *)modifiedRequestWithRequest:(nonnull NSURLRequest *)request;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
A downloader request modifier class with block.
|
||||
*/
|
||||
@interface SDWebImageDownloaderRequestModifier : NSObject <SDWebImageDownloaderRequestModifier>
|
||||
|
||||
- (nonnull instancetype)initWithBlock:(nonnull SDWebImageDownloaderRequestModifierBlock)block;
|
||||
|
|
|
@ -11,8 +11,10 @@
|
|||
|
||||
FOUNDATION_EXPORT NSErrorDomain const _Nonnull SDWebImageErrorDomain;
|
||||
|
||||
/// The HTTP status code for invalid download response (NSNumber *)
|
||||
FOUNDATION_EXPORT NSErrorUserInfoKey const _Nonnull SDWebImageErrorDownloadStatusCodeKey;
|
||||
|
||||
/// SDWebImage error domain and codes
|
||||
typedef NS_ERROR_ENUM(SDWebImageErrorDomain, SDWebImageError) {
|
||||
SDWebImageErrorInvalidURL = 1000, // The URL is invalid, such as nil URL or corrupted URL
|
||||
SDWebImageErrorBadImageData = 1001, // The image data can not be decoded to image, or the image data is empty
|
||||
|
|
|
@ -10,8 +10,10 @@
|
|||
|
||||
#if SD_UIKIT || SD_MAC
|
||||
|
||||
// A protocol to custom the indicator during the image loading
|
||||
// All of these methods are called from main queue
|
||||
/**
|
||||
A protocol to custom the indicator during the image loading.
|
||||
All of these methods are called from main queue.
|
||||
*/
|
||||
@protocol SDWebImageIndicator <NSObject>
|
||||
|
||||
@required
|
||||
|
@ -21,10 +23,12 @@
|
|||
@return The indicator view
|
||||
*/
|
||||
@property (nonatomic, strong, readonly, nonnull) UIView *indicatorView;
|
||||
|
||||
/**
|
||||
Start the animating for indicator.
|
||||
*/
|
||||
- (void)startAnimatingIndicator;
|
||||
|
||||
/**
|
||||
Stop the animating for indicator.
|
||||
*/
|
||||
|
@ -42,9 +46,11 @@
|
|||
|
||||
#pragma mark - Activity Indicator
|
||||
|
||||
// Activity indicator class
|
||||
// for UIKit(macOS), it use a `UIActivityIndicatorView`
|
||||
// for AppKit(macOS), it use a `NSProgressIndicator` with the spinning style
|
||||
/**
|
||||
Activity indicator class.
|
||||
for UIKit(macOS), it use a `UIActivityIndicatorView`.
|
||||
for AppKit(macOS), it use a `NSProgressIndicator` with the spinning style.
|
||||
*/
|
||||
@interface SDWebImageActivityIndicator : NSObject <SDWebImageIndicator>
|
||||
|
||||
#if SD_UIKIT
|
||||
|
@ -55,9 +61,12 @@
|
|||
|
||||
@end
|
||||
|
||||
// Convenience way to use activity indicator.
|
||||
/**
|
||||
Convenience way to use activity indicator.
|
||||
*/
|
||||
@interface SDWebImageActivityIndicator (Conveniences)
|
||||
|
||||
/// These indicator use the fixed color without dark mode support
|
||||
/// gray-style activity indicator
|
||||
@property (nonatomic, class, nonnull, readonly) SDWebImageActivityIndicator *grayIndicator;
|
||||
/// large gray-style activity indicator
|
||||
|
@ -66,14 +75,21 @@
|
|||
@property (nonatomic, class, nonnull, readonly) SDWebImageActivityIndicator *whiteIndicator;
|
||||
/// large white-style activity indicator
|
||||
@property (nonatomic, class, nonnull, readonly) SDWebImageActivityIndicator *whiteLargeIndicator;
|
||||
/// These indicator use the system style, supports dark mode if available (iOS 13+/macOS 10.14+)
|
||||
/// large activity indicator
|
||||
@property (nonatomic, class, nonnull, readonly) SDWebImageActivityIndicator *largeIndicator;
|
||||
/// medium activity indicator
|
||||
@property (nonatomic, class, nonnull, readonly) SDWebImageActivityIndicator *mediumIndicator;
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - Progress Indicator
|
||||
|
||||
// Progress indicator class
|
||||
// for UIKit(macOS), it use a `UIProgressView`
|
||||
// for AppKit(macOS), it use a `NSProgressIndicator` with the bar style
|
||||
/**
|
||||
Progress indicator class.
|
||||
for UIKit(macOS), it use a `UIProgressView`.
|
||||
for AppKit(macOS), it use a `NSProgressIndicator` with the bar style.
|
||||
*/
|
||||
@interface SDWebImageProgressIndicator : NSObject <SDWebImageIndicator>
|
||||
|
||||
#if SD_UIKIT
|
||||
|
@ -84,7 +100,9 @@
|
|||
|
||||
@end
|
||||
|
||||
// Convenience way to create progress indicator. Remember to specify the indicator width or use layout constraint if need.
|
||||
/**
|
||||
Convenience way to create progress indicator. Remember to specify the indicator width or use layout constraint if need.
|
||||
*/
|
||||
@interface SDWebImageProgressIndicator (Conveniences)
|
||||
|
||||
/// default-style progress indicator
|
||||
|
|
|
@ -14,6 +14,16 @@
|
|||
#import <QuartzCore/QuartzCore.h>
|
||||
#endif
|
||||
|
||||
#if SD_UIKIT
|
||||
#if __IPHONE_13_0 || __TVOS_13_0 || __MAC_10_15
|
||||
// Xcode 11
|
||||
#else
|
||||
// Supports Xcode 9 && 10 users, for those users, define these enum
|
||||
static NSInteger UIActivityIndicatorViewStyleMedium = 100;
|
||||
static NSInteger UIActivityIndicatorViewStyleLarge = 101;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#pragma mark - Activity Indicator
|
||||
|
||||
@interface SDWebImageActivityIndicator ()
|
||||
|
@ -83,6 +93,8 @@
|
|||
#else
|
||||
indicator.indicatorView.color = [UIColor colorWithWhite:0 alpha:0.45]; // Color from `UIActivityIndicatorViewStyleGray`
|
||||
#endif
|
||||
#else
|
||||
indicator.indicatorView.appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua]; // Disable dark mode support
|
||||
#endif
|
||||
return indicator;
|
||||
}
|
||||
|
@ -94,6 +106,7 @@
|
|||
indicator.indicatorView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
|
||||
indicator.indicatorView.color = grayColor;
|
||||
#else
|
||||
indicator.indicatorView.appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua]; // Disable dark mode support
|
||||
indicator.indicatorView.controlSize = NSControlSizeRegular;
|
||||
#endif
|
||||
[indicator.indicatorView sizeToFit];
|
||||
|
@ -105,6 +118,7 @@
|
|||
#if SD_UIKIT
|
||||
indicator.indicatorView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhite;
|
||||
#else
|
||||
indicator.indicatorView.appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua]; // Disable dark mode support
|
||||
CIFilter *lighten = [CIFilter filterWithName:@"CIColorControls"];
|
||||
[lighten setDefaults];
|
||||
[lighten setValue:@(1) forKey:kCIInputBrightnessKey];
|
||||
|
@ -118,12 +132,43 @@
|
|||
#if SD_UIKIT
|
||||
indicator.indicatorView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
|
||||
#else
|
||||
indicator.indicatorView.appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua]; // Disable dark mode support
|
||||
indicator.indicatorView.controlSize = NSControlSizeRegular;
|
||||
[indicator.indicatorView sizeToFit];
|
||||
#endif
|
||||
return indicator;
|
||||
}
|
||||
|
||||
+ (SDWebImageActivityIndicator *)largeIndicator {
|
||||
SDWebImageActivityIndicator *indicator = [SDWebImageActivityIndicator new];
|
||||
#if SD_UIKIT
|
||||
if (@available(iOS 13.0, tvOS 13.0, *)) {
|
||||
indicator.indicatorView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleLarge;
|
||||
} else {
|
||||
indicator.indicatorView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
|
||||
}
|
||||
#else
|
||||
indicator.indicatorView.controlSize = NSControlSizeRegular;
|
||||
[indicator.indicatorView sizeToFit];
|
||||
#endif
|
||||
return indicator;
|
||||
}
|
||||
|
||||
+ (SDWebImageActivityIndicator *)mediumIndicator {
|
||||
SDWebImageActivityIndicator *indicator = [SDWebImageActivityIndicator new];
|
||||
#if SD_UIKIT
|
||||
if (@available(iOS 13.0, tvOS 13.0, *)) {
|
||||
indicator.indicatorView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleMedium;
|
||||
} else {
|
||||
indicator.indicatorView.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhite;
|
||||
}
|
||||
#else
|
||||
indicator.indicatorView.controlSize = NSControlSizeSmall;
|
||||
[indicator.indicatorView sizeToFit];
|
||||
#endif
|
||||
return indicator;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
#pragma mark - Progress Indicator
|
||||
|
|
|
@ -13,12 +13,15 @@
|
|||
#import "SDImageTransformer.h"
|
||||
#import "SDWebImageCacheKeyFilter.h"
|
||||
#import "SDWebImageCacheSerializer.h"
|
||||
#import "SDWebImageOptionsProcessor.h"
|
||||
|
||||
typedef void(^SDExternalCompletionBlock)(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL);
|
||||
|
||||
typedef void(^SDInternalCompletionBlock)(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL);
|
||||
|
||||
// A combined operation representing the cache and loader operation. You can use it to cancel the load process.
|
||||
/**
|
||||
A combined operation representing the cache and loader operation. You can use it to cancel the load process.
|
||||
*/
|
||||
@interface SDWebImageCombinedOperation : NSObject <SDWebImageOperation>
|
||||
|
||||
/**
|
||||
|
@ -41,6 +44,9 @@ typedef void(^SDInternalCompletionBlock)(UIImage * _Nullable image, NSData * _Nu
|
|||
|
||||
@class SDWebImageManager;
|
||||
|
||||
/**
|
||||
The manager delegate protocol.
|
||||
*/
|
||||
@protocol SDWebImageManagerDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
@ -148,6 +154,32 @@ SDWebImageManager *manager = [SDWebImageManager sharedManager];
|
|||
*/
|
||||
@property (nonatomic, strong, nullable) id<SDWebImageCacheSerializer> cacheSerializer;
|
||||
|
||||
/**
|
||||
The options processor is used, to have a global control for all the image request options and context option for current manager.
|
||||
@note If you use `transformer`, `cacheKeyFilter` or `cacheSerializer` property of manager, the input context option already apply those properties before passed. This options processor is a better replacement for those property in common usage.
|
||||
For example, you can control the global options, based on the URL or original context option like the below code.
|
||||
|
||||
@code
|
||||
SDWebImageManager.sharedManager.optionsProcessor = [SDWebImageOptionsProcessor optionsProcessorWithBlock:^SDWebImageOptionsResult * _Nullable(NSURL * _Nullable url, SDWebImageOptions options, SDWebImageContext * _Nullable context) {
|
||||
// Only do animation on `SDAnimatedImageView`
|
||||
if (!context[SDWebImageContextAnimatedImageClass]) {
|
||||
options |= SDWebImageDecodeFirstFrameOnly;
|
||||
}
|
||||
// Do not force decode for png url
|
||||
if ([url.lastPathComponent isEqualToString:@"png"]) {
|
||||
options |= SDWebImageAvoidDecodeImage;
|
||||
}
|
||||
// Always use screen scale factor
|
||||
SDWebImageMutableContext *mutableContext = [NSDictionary dictionaryWithDictionary:context];
|
||||
mutableContext[SDWebImageContextImageScaleFactor] = @(UIScreen.mainScreen.scale);
|
||||
context = [mutableContext copy];
|
||||
|
||||
return [[SDWebImageOptionsResult alloc] initWithOptions:options context:context];
|
||||
}];
|
||||
@endcode
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) id<SDWebImageOptionsProcessor> optionsProcessor;
|
||||
|
||||
/**
|
||||
* Check one or more operations running
|
||||
*/
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#import "SDWebImageDownloader.h"
|
||||
#import "UIImage+Metadata.h"
|
||||
#import "SDWebImageError.h"
|
||||
#import "SDInternalMacros.h"
|
||||
|
||||
static id<SDImageCache> _defaultImageCache;
|
||||
static id<SDImageLoader> _defaultImageLoader;
|
||||
|
@ -150,11 +151,11 @@ static id<SDImageLoader> _defaultImageLoader;
|
|||
[self.runningOperations addObject:operation];
|
||||
SD_UNLOCK(self.runningOperationsLock);
|
||||
|
||||
// Preprocess the context arg to provide the default value from manager
|
||||
context = [self processedContextWithContext:context];
|
||||
// Preprocess the options and context arg to decide the final the result for manager
|
||||
SDWebImageOptionsResult *result = [self processedResultForURL:url options:options context:context];
|
||||
|
||||
// Start the entry to load image from cache
|
||||
[self callCacheProcessForOperation:operation url:url options:options context:context progress:progressBlock completed:completedBlock];
|
||||
[self callCacheProcessForOperation:operation url:url options:result.options context:result.context progress:progressBlock completed:completedBlock];
|
||||
|
||||
return operation;
|
||||
}
|
||||
|
@ -288,15 +289,41 @@ static id<SDImageLoader> _defaultImageLoader;
|
|||
finished:(BOOL)finished
|
||||
progress:(nullable SDImageLoaderProgressBlock)progressBlock
|
||||
completed:(nullable SDInternalCompletionBlock)completedBlock {
|
||||
// the target image store cache type
|
||||
SDImageCacheType storeCacheType = SDImageCacheTypeAll;
|
||||
if (context[SDWebImageContextStoreCacheType]) {
|
||||
storeCacheType = [context[SDWebImageContextStoreCacheType] integerValue];
|
||||
}
|
||||
// the original store image cache type
|
||||
SDImageCacheType originalStoreCacheType = SDImageCacheTypeNone;
|
||||
if (context[SDWebImageContextOriginalStoreCacheType]) {
|
||||
originalStoreCacheType = [context[SDWebImageContextOriginalStoreCacheType] integerValue];
|
||||
}
|
||||
id<SDWebImageCacheKeyFilter> cacheKeyFilter = context[SDWebImageContextCacheKeyFilter];
|
||||
NSString *key = [self cacheKeyForURL:url cacheKeyFilter:cacheKeyFilter];
|
||||
id<SDImageTransformer> transformer = context[SDWebImageContextImageTransformer];
|
||||
id<SDWebImageCacheSerializer> cacheSerializer = context[SDWebImageContextCacheSerializer];
|
||||
if (downloadedImage && (!downloadedImage.sd_isAnimated || (options & SDWebImageTransformAnimatedImage)) && transformer) {
|
||||
|
||||
BOOL shouldTransformImage = downloadedImage && (!downloadedImage.sd_isAnimated || (options & SDWebImageTransformAnimatedImage)) && transformer;
|
||||
BOOL shouldCacheOriginal = downloadedImage && finished;
|
||||
|
||||
// if available, store original image to cache
|
||||
if (shouldCacheOriginal) {
|
||||
// normally use the store cache type, but if target image is transformed, use original store cache type instead
|
||||
SDImageCacheType targetStoreCacheType = shouldTransformImage ? originalStoreCacheType : storeCacheType;
|
||||
if (cacheSerializer && (targetStoreCacheType == SDImageCacheTypeDisk || targetStoreCacheType == SDImageCacheTypeAll)) {
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
|
||||
@autoreleasepool {
|
||||
NSData *cacheData = [cacheSerializer cacheDataWithImage:downloadedImage originalData:downloadedData imageURL:url];
|
||||
[self.imageCache storeImage:downloadedImage imageData:cacheData forKey:key cacheType:targetStoreCacheType completion:nil];
|
||||
}
|
||||
});
|
||||
} else {
|
||||
[self.imageCache storeImage:downloadedImage imageData:downloadedData forKey:key cacheType:targetStoreCacheType completion:nil];
|
||||
}
|
||||
}
|
||||
// if available, store transformed image to cache
|
||||
if (shouldTransformImage) {
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
|
||||
@autoreleasepool {
|
||||
UIImage *transformedImage = [transformer transformedImageWithImage:downloadedImage forKey:key];
|
||||
|
@ -318,18 +345,6 @@ static id<SDImageLoader> _defaultImageLoader;
|
|||
}
|
||||
});
|
||||
} else {
|
||||
if (downloadedImage && finished) {
|
||||
if (cacheSerializer && (storeCacheType == SDImageCacheTypeDisk || storeCacheType == SDImageCacheTypeAll)) {
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
|
||||
@autoreleasepool {
|
||||
NSData *cacheData = [cacheSerializer cacheDataWithImage:downloadedImage originalData:downloadedData imageURL:url];
|
||||
[self.imageCache storeImage:downloadedImage imageData:cacheData forKey:key cacheType:storeCacheType completion:nil];
|
||||
}
|
||||
});
|
||||
} else {
|
||||
[self.imageCache storeImage:downloadedImage imageData:downloadedData forKey:key cacheType:storeCacheType completion:nil];
|
||||
}
|
||||
}
|
||||
[self callCompletionBlockForOperation:operation completion:completedBlock image:downloadedImage data:downloadedData error:nil cacheType:SDImageCacheTypeNone finished:finished url:url];
|
||||
}
|
||||
}
|
||||
|
@ -380,7 +395,8 @@ static id<SDImageLoader> _defaultImageLoader;
|
|||
return shouldBlockFailedURL;
|
||||
}
|
||||
|
||||
- (SDWebImageContext *)processedContextWithContext:(SDWebImageContext *)context {
|
||||
- (SDWebImageOptionsResult *)processedResultForURL:(NSURL *)url options:(SDWebImageOptions)options context:(SDWebImageContext *)context {
|
||||
SDWebImageOptionsResult *result;
|
||||
SDWebImageMutableContext *mutableContext = [SDWebImageMutableContext dictionary];
|
||||
|
||||
// Image Transformer from manager
|
||||
|
@ -399,12 +415,23 @@ static id<SDImageLoader> _defaultImageLoader;
|
|||
[mutableContext setValue:cacheSerializer forKey:SDWebImageContextCacheSerializer];
|
||||
}
|
||||
|
||||
if (mutableContext.count == 0) {
|
||||
return context;
|
||||
} else {
|
||||
[mutableContext addEntriesFromDictionary:context];
|
||||
return [mutableContext copy];
|
||||
if (mutableContext.count > 0) {
|
||||
if (context) {
|
||||
[mutableContext addEntriesFromDictionary:context];
|
||||
}
|
||||
context = [mutableContext copy];
|
||||
}
|
||||
|
||||
// Apply options processor
|
||||
if (self.optionsProcessor) {
|
||||
result = [self.optionsProcessor processedResultForURL:url options:options context:context];
|
||||
}
|
||||
if (!result) {
|
||||
// Use default options result
|
||||
result = [[SDWebImageOptionsResult alloc] initWithOptions:options context:context];
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -8,13 +8,14 @@
|
|||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
/// A protocol represents cancelable operation.
|
||||
@protocol SDWebImageOperation <NSObject>
|
||||
|
||||
- (void)cancel;
|
||||
|
||||
@end
|
||||
|
||||
// NSOperation conform to `SDWebImageOperation`
|
||||
/// NSOperation conform to `SDWebImageOperation`.
|
||||
@interface NSOperation (SDWebImageOperation) <SDWebImageOperation>
|
||||
|
||||
@end
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* This file is part of the SDWebImage package.
|
||||
* (c) Olivier Poitrey <rs@dailymotion.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "SDWebImageCompat.h"
|
||||
#import "SDWebImageDefine.h"
|
||||
|
||||
@class SDWebImageOptionsResult;
|
||||
|
||||
typedef SDWebImageOptionsResult * _Nullable(^SDWebImageOptionsProcessorBlock)(NSURL * _Nullable url, SDWebImageOptions options, SDWebImageContext * _Nullable context);
|
||||
|
||||
/**
|
||||
The options result contains both options and context.
|
||||
*/
|
||||
@interface SDWebImageOptionsResult : NSObject
|
||||
|
||||
/**
|
||||
WebCache options.
|
||||
*/
|
||||
@property (nonatomic, assign, readonly) SDWebImageOptions options;
|
||||
|
||||
/**
|
||||
Context options.
|
||||
*/
|
||||
@property (nonatomic, copy, readonly, nullable) SDWebImageContext *context;
|
||||
|
||||
/**
|
||||
Create a new options result.
|
||||
|
||||
@param options options
|
||||
@param context context
|
||||
@return The options result contains both options and context.
|
||||
*/
|
||||
- (nonnull instancetype)initWithOptions:(SDWebImageOptions)options context:(nullable SDWebImageContext *)context;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
This is the protocol for options processor.
|
||||
Options processor can be used, to control the final result for individual image request's `SDWebImageOptions` and `SDWebImageContext`
|
||||
Implements the protocol to have a global control for each indivadual image request's option.
|
||||
*/
|
||||
@protocol SDWebImageOptionsProcessor <NSObject>
|
||||
|
||||
/**
|
||||
Return the processed options result for specify image URL, with its options and context
|
||||
|
||||
@param url The URL to the image
|
||||
@param options A mask to specify options to use for this request
|
||||
@param context A context contains different options to perform specify changes or processes, see `SDWebImageContextOption`. This hold the extra objects which `options` enum can not hold.
|
||||
@return The processed result, contains both options and context
|
||||
*/
|
||||
- (nullable SDWebImageOptionsResult *)processedResultForURL:(nullable NSURL *)url
|
||||
options:(SDWebImageOptions)options
|
||||
context:(nullable SDWebImageContext *)context;
|
||||
|
||||
@end
|
||||
|
||||
/**
|
||||
A options processor class with block.
|
||||
*/
|
||||
@interface SDWebImageOptionsProcessor : NSObject<SDWebImageOptionsProcessor>
|
||||
|
||||
- (nonnull instancetype)initWithBlock:(nonnull SDWebImageOptionsProcessorBlock)block;
|
||||
+ (nonnull instancetype)optionsProcessorWithBlock:(nonnull SDWebImageOptionsProcessorBlock)block;
|
||||
|
||||
@end
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* This file is part of the SDWebImage package.
|
||||
* (c) Olivier Poitrey <rs@dailymotion.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
#import "SDWebImageOptionsProcessor.h"
|
||||
|
||||
@interface SDWebImageOptionsResult ()
|
||||
|
||||
@property (nonatomic, assign) SDWebImageOptions options;
|
||||
@property (nonatomic, copy, nullable) SDWebImageContext *context;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SDWebImageOptionsResult
|
||||
|
||||
- (instancetype)initWithOptions:(SDWebImageOptions)options context:(SDWebImageContext *)context {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.options = options;
|
||||
self.context = context;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@interface SDWebImageOptionsProcessor ()
|
||||
|
||||
@property (nonatomic, copy, nonnull) SDWebImageOptionsProcessorBlock block;
|
||||
|
||||
@end
|
||||
|
||||
@implementation SDWebImageOptionsProcessor
|
||||
|
||||
- (instancetype)initWithBlock:(SDWebImageOptionsProcessorBlock)block {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.block = block;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
+ (instancetype)optionsProcessorWithBlock:(SDWebImageOptionsProcessorBlock)block {
|
||||
SDWebImageOptionsProcessor *optionsProcessor = [[SDWebImageOptionsProcessor alloc] initWithBlock:block];
|
||||
return optionsProcessor;
|
||||
}
|
||||
|
||||
- (SDWebImageOptionsResult *)processedResultForURL:(NSURL *)url options:(SDWebImageOptions)options context:(SDWebImageContext *)context {
|
||||
if (!self.block) {
|
||||
return nil;
|
||||
}
|
||||
return self.block(url, options, context);
|
||||
}
|
||||
|
||||
@end
|
|
@ -11,6 +11,9 @@
|
|||
|
||||
@class SDWebImagePrefetcher;
|
||||
|
||||
/**
|
||||
A token represents a list of URLs, can be used to cancel the download.
|
||||
*/
|
||||
@interface SDWebImagePrefetchToken : NSObject <SDWebImageOperation>
|
||||
|
||||
/**
|
||||
|
@ -25,6 +28,9 @@
|
|||
|
||||
@end
|
||||
|
||||
/**
|
||||
The prefetcher delegate protocol
|
||||
*/
|
||||
@protocol SDWebImagePrefetcherDelegate <NSObject>
|
||||
|
||||
@optional
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
|
||||
#import "SDWebImagePrefetcher.h"
|
||||
#import "SDAsyncBlockOperation.h"
|
||||
#import "SDInternalMacros.h"
|
||||
#import <stdatomic.h>
|
||||
|
||||
@interface SDWebImagePrefetchToken () {
|
||||
|
|
|
@ -11,11 +11,6 @@
|
|||
#if SD_UIKIT || SD_MAC
|
||||
#import "SDImageCache.h"
|
||||
|
||||
// This class is used to provide a transition animation after the view category load image finished. Use this on `sd_imageTransition` in UIView+WebCache.h
|
||||
// for UIKit(iOS & tvOS), we use `+[UIView transitionWithView:duration:options:animations:completion]` for transition animation.
|
||||
// for AppKit(macOS), we use `+[NSAnimationContext runAnimationGroup:completionHandler:]` for transition animation. You can call `+[NSAnimationContext currentContext]` to grab the context during animations block.
|
||||
// These transition are provided for basic usage. If you need complicated animation, consider to directly use Core Animation or use `SDWebImageAvoidAutoSetImage` and implement your own after image load finished.
|
||||
|
||||
#if SD_UIKIT
|
||||
typedef UIViewAnimationOptions SDWebImageAnimationOptions;
|
||||
#else
|
||||
|
@ -28,6 +23,12 @@ typedef void (^SDWebImageTransitionPreparesBlock)(__kindof UIView * _Nonnull vie
|
|||
typedef void (^SDWebImageTransitionAnimationsBlock)(__kindof UIView * _Nonnull view, UIImage * _Nullable image);
|
||||
typedef void (^SDWebImageTransitionCompletionBlock)(BOOL finished);
|
||||
|
||||
/**
|
||||
This class is used to provide a transition animation after the view category load image finished. Use this on `sd_imageTransition` in UIView+WebCache.h
|
||||
for UIKit(iOS & tvOS), we use `+[UIView transitionWithView:duration:options:animations:completion]` for transition animation.
|
||||
for AppKit(macOS), we use `+[NSAnimationContext runAnimationGroup:completionHandler:]` for transition animation. You can call `+[NSAnimationContext currentContext]` to grab the context during animations block.
|
||||
@note These transition are provided for basic usage. If you need complicated animation, consider to directly use Core Animation or use `SDWebImageAvoidAutoSetImage` and implement your own after image load finished.
|
||||
*/
|
||||
@interface SDWebImageTransition : NSObject
|
||||
|
||||
/**
|
||||
|
@ -61,10 +62,11 @@ typedef void (^SDWebImageTransitionCompletionBlock)(BOOL finished);
|
|||
|
||||
@end
|
||||
|
||||
// Convenience way to create transition. Remember to specify the duration if needed.
|
||||
// for UIKit, these transition just use the correspond `animationOptions`. By default we enable `UIViewAnimationOptionAllowUserInteraction` to allow user interaction during transition.
|
||||
// for AppKit, these transition use Core Animation in `animations`. So your view must be layer-backed. Set `wantsLayer = YES` before you apply it.
|
||||
|
||||
/**
|
||||
Convenience way to create transition. Remember to specify the duration if needed.
|
||||
for UIKit, these transition just use the correspond `animationOptions`. By default we enable `UIViewAnimationOptionAllowUserInteraction` to allow user interaction during transition.
|
||||
for AppKit, these transition use Core Animation in `animations`. So your view must be layer-backed. Set `wantsLayer = YES` before you apply it.
|
||||
*/
|
||||
@interface SDWebImageTransition (Conveniences)
|
||||
|
||||
/// Fade transition.
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#import "SDWebImageManager.h"
|
||||
|
||||
/**
|
||||
* Integrates SDWebImage async downloading and caching of remote images with UIButtonView.
|
||||
* Integrates SDWebImage async downloading and caching of remote images with UIButton.
|
||||
*/
|
||||
@interface UIButton (WebCache)
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#import "objc/runtime.h"
|
||||
#import "UIView+WebCacheOperation.h"
|
||||
#import "UIView+WebCache.h"
|
||||
#import "SDInternalMacros.h"
|
||||
|
||||
static char imageURLStorageKey;
|
||||
|
||||
|
@ -188,7 +189,7 @@ static inline NSString * backgroundImageOperationKeyForState(UIControlState stat
|
|||
} else {
|
||||
mutableContext = [NSMutableDictionary dictionary];
|
||||
}
|
||||
mutableContext[SDWebImageContextSetImageOperationKey] = imageOperationKeyForState(state);
|
||||
mutableContext[SDWebImageContextSetImageOperationKey] = backgroundImageOperationKeyForState(state);
|
||||
@weakify(self);
|
||||
[self sd_internalSetImageWithURL:url
|
||||
placeholderImage:placeholder
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
#import "SDWebImageCompat.h"
|
||||
|
||||
/**
|
||||
UIImage category about force decode feature (avoid Image/IO's lazy decoding during rendering behavior).
|
||||
*/
|
||||
@interface UIImage (ForceDecode)
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
|
||||
#import "SDWebImageCompat.h"
|
||||
|
||||
// This category is just use as a convenience method. For more detail control, use methods in `UIImage+MultiFormat.h` or directlly use `SDImageCoder`
|
||||
/**
|
||||
This category is just use as a convenience method. For more detail control, use methods in `UIImage+MultiFormat.h` or directlly use `SDImageCoder`.
|
||||
*/
|
||||
@interface UIImage (GIF)
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
|
||||
#import "SDWebImageCompat.h"
|
||||
|
||||
/**
|
||||
UIImage category for memory cache cost.
|
||||
*/
|
||||
@interface UIImage (MemoryCacheCost)
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
#import "SDWebImageCompat.h"
|
||||
#import "NSData+ImageContentType.h"
|
||||
|
||||
/**
|
||||
UIImage category for image metadata, including animation, loop count, format, incremental, etc.
|
||||
*/
|
||||
@interface UIImage (Metadata)
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,6 +9,9 @@
|
|||
#import "SDWebImageCompat.h"
|
||||
#import "NSData+ImageContentType.h"
|
||||
|
||||
/**
|
||||
UIImage category for convenient image format decoding/encoding.
|
||||
*/
|
||||
@interface UIImage (MultiFormat)
|
||||
#pragma mark - Decode
|
||||
/**
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
|
||||
#import "UIView+WebCacheOperation.h"
|
||||
#import "UIView+WebCache.h"
|
||||
#import "SDInternalMacros.h"
|
||||
|
||||
static NSString * const SDHighlightedImageOperationKey = @"UIImageViewImageOperationHighlighted";
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@
|
|||
#import "SDWebImageManager.h"
|
||||
|
||||
/**
|
||||
* Integrates SDWebImage async downloading and caching of remote images with UIImageView.
|
||||
*
|
||||
* Usage with a UITableViewCell sub-class:
|
||||
*
|
||||
* @code
|
||||
|
@ -41,6 +39,10 @@
|
|||
|
||||
* @endcode
|
||||
*/
|
||||
|
||||
/**
|
||||
* Integrates SDWebImage async downloading and caching of remote images with UIImageView.
|
||||
*/
|
||||
@interface UIImageView (WebCache)
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,6 +19,9 @@ FOUNDATION_EXPORT const int64_t SDWebImageProgressUnitCountUnknown; /* 1LL */
|
|||
|
||||
typedef void(^SDSetImageBlock)(UIImage * _Nullable image, NSData * _Nullable imageData, SDImageCacheType cacheType, NSURL * _Nullable imageURL);
|
||||
|
||||
/**
|
||||
Integrates SDWebImage async downloading and caching of remote images with UIView subclass.
|
||||
*/
|
||||
@interface UIView (WebCache)
|
||||
|
||||
/**
|
||||
|
@ -32,7 +35,7 @@ typedef void(^SDSetImageBlock)(UIImage * _Nullable image, NSData * _Nullable ima
|
|||
* The current image loading progress associated to the view. The unit count is the received size and excepted size of download.
|
||||
* The `totalUnitCount` and `completedUnitCount` will be reset to 0 after a new image loading start (change from current queue). And they will be set to `SDWebImageProgressUnitCountUnknown` if the progressBlock not been called but the image loading success to mark the progress finished (change from main queue).
|
||||
* @note You can use Key-Value Observing on the progress, but you should take care that the change to progress is from a background queue during download(the same as progressBlock). If you want to using KVO and update the UI, make sure to dispatch on the main queue. And it's recommand to use some KVO libs like KVOController because it's more safe and easy to use.
|
||||
* @note The getter will create a progress instance if the value is nil. You can also set a custom progress instance and let it been updated during image loading
|
||||
* @note The getter will create a progress instance if the value is nil. But by default, we don't create one. If you need to use Key-Value Observing, you must trigger the getter or set a custom progresss instance before the loading start. The default value is nil.
|
||||
* @note Note that because of the limitations of categories this property can get out of sync if you update the progress directly.
|
||||
*/
|
||||
@property (nonatomic, strong, null_resettable) NSProgress *sd_imageProgress;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#import "objc/runtime.h"
|
||||
#import "UIView+WebCacheOperation.h"
|
||||
#import "SDWebImageError.h"
|
||||
#import "SDInternalMacros.h"
|
||||
|
||||
const int64_t SDWebImageProgressUnitCountUnknown = 1LL;
|
||||
|
||||
|
@ -68,8 +69,11 @@ const int64_t SDWebImageProgressUnitCountUnknown = 1LL;
|
|||
|
||||
if (url) {
|
||||
// reset the progress
|
||||
self.sd_imageProgress.totalUnitCount = 0;
|
||||
self.sd_imageProgress.completedUnitCount = 0;
|
||||
NSProgress *imageProgress = objc_getAssociatedObject(self, @selector(sd_imageProgress));
|
||||
if (imageProgress) {
|
||||
imageProgress.totalUnitCount = 0;
|
||||
imageProgress.completedUnitCount = 0;
|
||||
}
|
||||
|
||||
#if SD_UIKIT || SD_MAC
|
||||
// check and start image indicator
|
||||
|
@ -82,15 +86,18 @@ const int64_t SDWebImageProgressUnitCountUnknown = 1LL;
|
|||
manager = [SDWebImageManager sharedManager];
|
||||
}
|
||||
|
||||
@weakify(self);
|
||||
SDImageLoaderProgressBlock combinedProgressBlock = ^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
|
||||
@strongify(self);
|
||||
NSProgress *imageProgress = self.sd_imageProgress;
|
||||
imageProgress.totalUnitCount = expectedSize;
|
||||
imageProgress.completedUnitCount = receivedSize;
|
||||
if (imageProgress) {
|
||||
imageProgress.totalUnitCount = expectedSize;
|
||||
imageProgress.completedUnitCount = receivedSize;
|
||||
}
|
||||
#if SD_UIKIT || SD_MAC
|
||||
if ([imageIndicator respondsToSelector:@selector(updateIndicatorProgress:)]) {
|
||||
double progress = imageProgress.fractionCompleted;
|
||||
double progress = 0;
|
||||
if (expectedSize != 0) {
|
||||
progress = (double)receivedSize / expectedSize;
|
||||
}
|
||||
progress = MAX(MIN(progress, 1), 0); // 0.0 - 1.0
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[imageIndicator updateIndicatorProgress:progress];
|
||||
});
|
||||
|
@ -100,13 +107,14 @@ const int64_t SDWebImageProgressUnitCountUnknown = 1LL;
|
|||
progressBlock(receivedSize, expectedSize, targetURL);
|
||||
}
|
||||
};
|
||||
@weakify(self);
|
||||
id <SDWebImageOperation> operation = [manager loadImageWithURL:url options:options context:context progress:combinedProgressBlock completed:^(UIImage *image, NSData *data, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {
|
||||
@strongify(self);
|
||||
if (!self) { return; }
|
||||
// if the progress not been updated, mark it to complete state
|
||||
if (finished && !error && self.sd_imageProgress.totalUnitCount == 0 && self.sd_imageProgress.completedUnitCount == 0) {
|
||||
self.sd_imageProgress.totalUnitCount = SDWebImageProgressUnitCountUnknown;
|
||||
self.sd_imageProgress.completedUnitCount = SDWebImageProgressUnitCountUnknown;
|
||||
if (imageProgress && finished && !error && imageProgress.totalUnitCount == 0 && imageProgress.completedUnitCount == 0) {
|
||||
imageProgress.totalUnitCount = SDWebImageProgressUnitCountUnknown;
|
||||
imageProgress.completedUnitCount = SDWebImageProgressUnitCountUnknown;
|
||||
}
|
||||
|
||||
#if SD_UIKIT || SD_MAC
|
||||
|
|
|
@ -9,8 +9,10 @@
|
|||
#import "SDWebImageCompat.h"
|
||||
#import "SDWebImageOperation.h"
|
||||
|
||||
// These methods are used to support canceling for UIView image loading, it's designed to be used internal but not external.
|
||||
// All the stored operations are weak, so it will be dalloced after image loading finished. If you need to store operations, use your own class to keep a strong reference for them.
|
||||
/**
|
||||
These methods are used to support canceling for UIView image loading, it's designed to be used internal but not external.
|
||||
All the stored operations are weak, so it will be dalloced after image loading finished. If you need to store operations, use your own class to keep a strong reference for them.
|
||||
*/
|
||||
@interface UIView (WebCacheOperation)
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
source 'https://github.com/CocoaPods/Specs.git'
|
||||
|
||||
use_frameworks!
|
||||
|
||||
project 'SDWebImage Tests'
|
||||
workspace '../SDWebImage'
|
||||
|
||||
target 'Tests' do
|
||||
platform :ios, '8.0'
|
||||
pod 'Expecta'
|
||||
pod 'KVOController'
|
||||
pod 'SDWebImage/MapKit', :path => '../'
|
||||
|
||||
end
|
||||
|
||||
target 'Tests Mac' do
|
||||
platform :osx, '10.10'
|
||||
pod 'Expecta'
|
||||
pod 'KVOController'
|
||||
pod 'SDWebImage/MapKit', :path => '../'
|
||||
|
||||
end
|
|
@ -10,6 +10,8 @@
|
|||
1E3C51E919B46E370092B5E6 /* SDWebImageDownloaderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E3C51E819B46E370092B5E6 /* SDWebImageDownloaderTests.m */; };
|
||||
2D7AF0601F329763000083C2 /* SDTestCase.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D7AF05F1F329763000083C2 /* SDTestCase.m */; };
|
||||
320630412085A37C006E0FA4 /* SDAnimatedImageTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 32A571552037DB2D002EDAAE /* SDAnimatedImageTest.m */; };
|
||||
3222417F2272F808002429DB /* SDUtilsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3222417E2272F808002429DB /* SDUtilsTests.m */; };
|
||||
322241802272F808002429DB /* SDUtilsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3222417E2272F808002429DB /* SDUtilsTests.m */; };
|
||||
3226ECBB20754F7700FAFACF /* SDWebImageTestDownloadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 3226ECBA20754F7700FAFACF /* SDWebImageTestDownloadOperation.m */; };
|
||||
3226ECBC20754F7700FAFACF /* SDWebImageTestDownloadOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 3226ECBA20754F7700FAFACF /* SDWebImageTestDownloadOperation.m */; };
|
||||
323B8E1F20862322008952BE /* SDWebImageTestLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 323B8E1E20862322008952BE /* SDWebImageTestLoader.m */; };
|
||||
|
@ -72,11 +74,12 @@
|
|||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
0AD1DD30CCB1B928CFA9740B /* Pods-Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Tests/Pods-Tests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
0AD1DD30CCB1B928CFA9740B /* Pods-Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-Tests/Pods-Tests.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
0FF4CD8ECC995718F4F44BE4 /* Pods_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
1E3C51E819B46E370092B5E6 /* SDWebImageDownloaderTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDWebImageDownloaderTests.m; sourceTree = "<group>"; };
|
||||
2D7AF05E1F329763000083C2 /* SDTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDTestCase.h; sourceTree = "<group>"; };
|
||||
2D7AF05F1F329763000083C2 /* SDTestCase.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDTestCase.m; sourceTree = "<group>"; };
|
||||
3222417E2272F808002429DB /* SDUtilsTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDUtilsTests.m; sourceTree = "<group>"; };
|
||||
3226ECB920754F7700FAFACF /* SDWebImageTestDownloadOperation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDWebImageTestDownloadOperation.h; sourceTree = "<group>"; };
|
||||
3226ECBA20754F7700FAFACF /* SDWebImageTestDownloadOperation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDWebImageTestDownloadOperation.m; sourceTree = "<group>"; };
|
||||
323B8E1D20862322008952BE /* SDWebImageTestLoader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDWebImageTestLoader.h; sourceTree = "<group>"; };
|
||||
|
@ -108,11 +111,11 @@
|
|||
4369C1D01D97F80F007E863A /* SDWebImagePrefetcherTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDWebImagePrefetcherTests.m; sourceTree = "<group>"; };
|
||||
4369C2731D9804B1007E863A /* SDWebCacheCategoriesTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDWebCacheCategoriesTests.m; sourceTree = "<group>"; };
|
||||
43828A441DA67F9900000E62 /* TestImageLarge.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = TestImageLarge.jpg; sourceTree = "<group>"; };
|
||||
4835C04148C737D0FC50EF87 /* Pods-Tests Mac.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests Mac.release.xcconfig"; path = "Pods/Target Support Files/Pods-Tests Mac/Pods-Tests Mac.release.xcconfig"; sourceTree = "<group>"; };
|
||||
4835C04148C737D0FC50EF87 /* Pods-Tests Mac.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests Mac.release.xcconfig"; path = "../Pods/Target Support Files/Pods-Tests Mac/Pods-Tests Mac.release.xcconfig"; sourceTree = "<group>"; };
|
||||
5F7F38AC1AE2A77A00B0E330 /* TestImage.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = TestImage.jpg; sourceTree = "<group>"; };
|
||||
6700DBD9C45B00AB5F77472A /* Pods-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-Tests/Pods-Tests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
6700DBD9C45B00AB5F77472A /* Pods-Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests.release.xcconfig"; path = "../Pods/Target Support Files/Pods-Tests/Pods-Tests.release.xcconfig"; sourceTree = "<group>"; };
|
||||
A39EDFED1067C297B91792CB /* Pods_Tests_Mac.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Tests_Mac.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
BC6C6328775701B5AAEEF4FF /* Pods-Tests Mac.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests Mac.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Tests Mac/Pods-Tests Mac.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
BC6C6328775701B5AAEEF4FF /* Pods-Tests Mac.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Tests Mac.debug.xcconfig"; path = "../Pods/Target Support Files/Pods-Tests Mac/Pods-Tests Mac.debug.xcconfig"; sourceTree = "<group>"; };
|
||||
DA248D53195472AA00390AB0 /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
DA248D56195472AA00390AB0 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
|
||||
DA248D58195472AA00390AB0 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
|
||||
|
@ -231,6 +234,7 @@
|
|||
3254C31F20641077008D1022 /* SDImageTransformerTests.m */,
|
||||
4369C2731D9804B1007E863A /* SDWebCacheCategoriesTests.m */,
|
||||
32B99E8A203AF8690017FD66 /* SDCategoriesTests.m */,
|
||||
3222417E2272F808002429DB /* SDUtilsTests.m */,
|
||||
32A571552037DB2D002EDAAE /* SDAnimatedImageTest.m */,
|
||||
37D122861EC48B5E00D98CEB /* SDMockFileManager.h */,
|
||||
37D122871EC48B5E00D98CEB /* SDMockFileManager.m */,
|
||||
|
@ -434,15 +438,15 @@
|
|||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Tests Mac/Pods-Tests Mac-frameworks.sh",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImage-Core-MapKit-macOS/SDWebImage.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/Expecta-macOS/Expecta.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/KVOController-macOS/KVOController.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImage-macOS/SDWebImage.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Expecta.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KVOController.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
|
@ -456,15 +460,15 @@
|
|||
);
|
||||
inputPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Tests/Pods-Tests-frameworks.sh",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImage-Core-MapKit-iOS/SDWebImage.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/Expecta-iOS/Expecta.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/KVOController-iOS/KVOController.framework",
|
||||
"${BUILT_PRODUCTS_DIR}/SDWebImage-iOS/SDWebImage.framework",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputPaths = (
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Expecta.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/KVOController.framework",
|
||||
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
|
@ -489,6 +493,7 @@
|
|||
32B99E9D203B2F7D0017FD66 /* SDWebImageTestCoder.m in Sources */,
|
||||
32B99E9E203B2F810017FD66 /* SDMockFileManager.m in Sources */,
|
||||
32B99EAB203B36620017FD66 /* SDWebImageManagerTests.m in Sources */,
|
||||
322241802272F808002429DB /* SDUtilsTests.m in Sources */,
|
||||
32B99EA9203B34B60017FD66 /* SDImageCoderTests.m in Sources */,
|
||||
3264FF30205D42CB00F6BD48 /* SDWebImageTestTransformer.m in Sources */,
|
||||
320630412085A37C006E0FA4 /* SDAnimatedImageTest.m in Sources */,
|
||||
|
@ -512,6 +517,7 @@
|
|||
2D7AF0601F329763000083C2 /* SDTestCase.m in Sources */,
|
||||
328BB6DD20825E9800760D6C /* SDWebImageTestCache.m in Sources */,
|
||||
4369C1D11D97F80F007E863A /* SDWebImagePrefetcherTests.m in Sources */,
|
||||
3222417F2272F808002429DB /* SDUtilsTests.m in Sources */,
|
||||
DA248D69195475D800390AB0 /* SDImageCacheTests.m in Sources */,
|
||||
DA248D6B195476AC00390AB0 /* SDWebImageManagerTests.m in Sources */,
|
||||
32B99E8B203AF8690017FD66 /* SDCategoriesTests.m in Sources */,
|
||||
|
|
|
@ -62,13 +62,6 @@
|
|||
ReferencedContainer = "container:SDWebImage Tests.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<EnvironmentVariables>
|
||||
<EnvironmentVariable
|
||||
key = "OS_ACTIVITY_MODE"
|
||||
value = "disable"
|
||||
isEnabled = "YES">
|
||||
</EnvironmentVariable>
|
||||
</EnvironmentVariables>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
|
|
|
@ -27,10 +27,6 @@ static const NSUInteger kTestGIFFrameCount = 5; // local TestImage.gif loop coun
|
|||
|
||||
@implementation SDAnimatedImageTest
|
||||
|
||||
- (void)tearDown {
|
||||
[[SDImageCache sharedImageCache] removeImageForKey:kTestGIFURL fromDisk:YES withCompletion:nil];
|
||||
}
|
||||
|
||||
- (void)test01AnimatedImageInitWithData {
|
||||
NSData *invalidData = [@"invalid data" dataUsingEncoding:NSUTF8StringEncoding];
|
||||
SDAnimatedImage *image = [[SDAnimatedImage alloc] initWithData:invalidData];
|
||||
|
@ -64,6 +60,7 @@ static const NSUInteger kTestGIFFrameCount = 5; // local TestImage.gif loop coun
|
|||
|
||||
- (void)test04AnimatedImageImageNamed {
|
||||
NSBundle *bundle = [NSBundle bundleForClass:[self class]];
|
||||
expect([SDAnimatedImage imageNamed:@"TestImage.gif"]).beNil(); // Not in main bundle
|
||||
#if SD_UIKIT
|
||||
SDAnimatedImage *image = [SDAnimatedImage imageNamed:@"TestImage.gif" inBundle:bundle compatibleWithTraitCollection:nil];
|
||||
#else
|
||||
|
@ -86,6 +83,9 @@ static const NSUInteger kTestGIFFrameCount = 5; // local TestImage.gif loop coun
|
|||
// Test one frame
|
||||
UIImage *frame = [image animatedImageFrameAtIndex:0];
|
||||
expect(frame).notTo.beNil();
|
||||
|
||||
// Unload all frames
|
||||
[image unloadAllFrames];
|
||||
}
|
||||
|
||||
- (void)test06AnimatedImageViewSetImage {
|
||||
|
@ -115,9 +115,16 @@ static const NSUInteger kTestGIFFrameCount = 5; // local TestImage.gif loop coun
|
|||
- (void)test10AnimatedImageInitWithCoder {
|
||||
SDAnimatedImage *image1 = [SDAnimatedImage imageWithContentsOfFile:[self testGIFPath]];
|
||||
expect(image1).notTo.beNil();
|
||||
NSData *encodedData = [NSKeyedArchiver archivedDataWithRootObject:image1];
|
||||
NSMutableData *encodedData = [NSMutableData data];
|
||||
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initForWritingWithMutableData:encodedData];
|
||||
archiver.requiresSecureCoding = YES;
|
||||
[archiver encodeObject:image1 forKey:NSKeyedArchiveRootObjectKey];
|
||||
[archiver finishEncoding];
|
||||
expect(encodedData).notTo.beNil();
|
||||
SDAnimatedImage *image2 = [NSKeyedUnarchiver unarchiveObjectWithData:encodedData];
|
||||
NSKeyedUnarchiver *unarchiver = [[NSKeyedUnarchiver alloc] initForReadingWithData:encodedData];
|
||||
unarchiver.requiresSecureCoding = YES;
|
||||
SDAnimatedImage *image2 = [unarchiver decodeObjectOfClass:SDAnimatedImage.class forKey:NSKeyedArchiveRootObjectKey];
|
||||
[unarchiver finishDecoding];
|
||||
expect(image2).notTo.beNil();
|
||||
|
||||
// Check each property
|
||||
|
@ -149,6 +156,20 @@ static const NSUInteger kTestGIFFrameCount = 5; // local TestImage.gif loop coun
|
|||
#endif
|
||||
}
|
||||
|
||||
- (void)test13AnimatedImageViewInitWithImage {
|
||||
// Test that -[SDAnimatedImageView initWithImage:] this convenience initializer not crash
|
||||
SDAnimatedImage *image = [SDAnimatedImage imageWithData:[self testAPNGPData]];
|
||||
SDAnimatedImageView *imageView;
|
||||
#if SD_UIKIT
|
||||
imageView = [[SDAnimatedImageView alloc] initWithImage:image];
|
||||
#else
|
||||
if (@available(macOS 10.12, *)) {
|
||||
imageView = [SDAnimatedImageView imageViewWithImage:image];
|
||||
}
|
||||
#endif
|
||||
expect(imageView.image).equal(image);
|
||||
}
|
||||
|
||||
- (void)test20AnimatedImageViewRendering {
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"test SDAnimatedImageView rendering"];
|
||||
SDAnimatedImageView *imageView = [[SDAnimatedImageView alloc] init];
|
||||
|
@ -232,9 +253,11 @@ static const NSUInteger kTestGIFFrameCount = 5; // local TestImage.gif loop coun
|
|||
}
|
||||
|
||||
- (void)test23AnimatedImageViewCategoryProgressive {
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"test SDAnimatedImageView view category"];
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"test SDAnimatedImageView view category progressive"];
|
||||
SDAnimatedImageView *imageView = [SDAnimatedImageView new];
|
||||
NSURL *testURL = [NSURL URLWithString:kTestGIFURL];
|
||||
[SDImageCache.sharedImageCache removeImageFromMemoryForKey:testURL.absoluteString];
|
||||
[SDImageCache.sharedImageCache removeImageFromDiskForKey:testURL.absoluteString];
|
||||
[imageView sd_setImageWithURL:testURL placeholderImage:nil options:SDWebImageProgressiveLoad progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
UIImage *image = imageView.image;
|
||||
|
@ -250,6 +273,22 @@ static const NSUInteger kTestGIFFrameCount = 5; // local TestImage.gif loop coun
|
|||
expect(error).to.beNil();
|
||||
expect(image).notTo.beNil();
|
||||
expect([image isKindOfClass:[SDAnimatedImage class]]).beTruthy();
|
||||
expect(cacheType).equal(SDImageCacheTypeNone);
|
||||
[expectation fulfill];
|
||||
}];
|
||||
[self waitForExpectationsWithCommonTimeout];
|
||||
}
|
||||
|
||||
- (void)test24AnimatedImageViewCategoryDiskCache {
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"test SDAnimatedImageView view category disk cache"];
|
||||
SDAnimatedImageView *imageView = [SDAnimatedImageView new];
|
||||
NSURL *testURL = [NSURL URLWithString:kTestGIFURL];
|
||||
[SDImageCache.sharedImageCache removeImageFromMemoryForKey:testURL.absoluteString];
|
||||
[imageView sd_setImageWithURL:testURL placeholderImage:nil completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
|
||||
expect(error).to.beNil();
|
||||
expect(image).notTo.beNil();
|
||||
expect(cacheType).equal(SDImageCacheTypeDisk);
|
||||
expect([image isKindOfClass:[SDAnimatedImage class]]).beTruthy();
|
||||
[expectation fulfill];
|
||||
}];
|
||||
[self waitForExpectationsWithCommonTimeout];
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
// Test invalid format
|
||||
CFStringRef type = [NSData sd_UTTypeFromImageFormat:SDImageFormatUndefined];
|
||||
expect(CFStringCompare(kUTTypePNG, type, 0)).equal(kCFCompareEqualTo);
|
||||
expect([NSData sd_imageFormatFromUTType:kUTTypeImage]).equal(SDImageFormatUndefined);
|
||||
}
|
||||
|
||||
- (void)test02UIImageMultiFormatCategory {
|
||||
|
@ -39,6 +40,8 @@
|
|||
// Test image encode PNG
|
||||
data = [image sd_imageDataAsFormat:SDImageFormatPNG];
|
||||
expect(data).notTo.beNil();
|
||||
// Test image decode PNG
|
||||
expect([UIImage sd_imageWithData:data scale:1 firstFrameOnly:YES]).notTo.beNil();
|
||||
// Test image encode JPEG with compressionQuality
|
||||
NSData *jpegData1 = [image sd_imageDataAsFormat:SDImageFormatJPEG compressionQuality:1];
|
||||
NSData *jpegData2 = [image sd_imageDataAsFormat:SDImageFormatJPEG compressionQuality:0.5];
|
||||
|
|
|
@ -133,6 +133,7 @@ static NSString *kTestImageKeyPNG = @"TestImageKey.png";
|
|||
XCTFail(@"Image should not be in cache");
|
||||
}
|
||||
}];
|
||||
[[SDImageCache sharedImageCache] storeImageToMemory:image forKey:kTestImageKeyJPEG];
|
||||
[[SDImageCache sharedImageCache] clearMemory];
|
||||
expect([[SDImageCache sharedImageCache] imageFromMemoryCacheForKey:kTestImageKeyJPEG]).to.beNil();
|
||||
[self waitForExpectationsWithCommonTimeout];
|
||||
|
@ -186,6 +187,35 @@ static NSString *kTestImageKeyPNG = @"TestImageKey.png";
|
|||
[self waitForExpectationsWithCommonTimeout];
|
||||
}
|
||||
|
||||
- (void)test13DeleteOldFiles {
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"deleteOldFiles"];
|
||||
[SDImageCache sharedImageCache].config.maxDiskAge = 1; // 1 second to mark all as out-dated
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[[SDImageCache sharedImageCache] deleteOldFilesWithCompletionBlock:^{
|
||||
expect(SDImageCache.sharedImageCache.totalDiskCount).equal(0);
|
||||
[expectation fulfill];
|
||||
}];
|
||||
});
|
||||
[self waitForExpectationsWithCommonTimeout];
|
||||
}
|
||||
|
||||
- (void)test14QueryCacheFirstFrameOnlyHitMemoryCache {
|
||||
NSString *key = kTestGIFURL;
|
||||
UIImage *animatedImage = [self testGIFImage];
|
||||
[[SDImageCache sharedImageCache] storeImageToMemory:animatedImage forKey:key];
|
||||
[[SDImageCache sharedImageCache] queryCacheOperationForKey:key done:^(UIImage * _Nullable image, NSData * _Nullable data, SDImageCacheType cacheType) {
|
||||
expect(cacheType).equal(SDImageCacheTypeMemory);
|
||||
expect(image.sd_isAnimated).beTruthy();
|
||||
expect(image == animatedImage).beTruthy();
|
||||
}];
|
||||
[[SDImageCache sharedImageCache] queryCacheOperationForKey:key options:SDImageCacheDecodeFirstFrameOnly done:^(UIImage * _Nullable image, NSData * _Nullable data, SDImageCacheType cacheType) {
|
||||
expect(cacheType).equal(SDImageCacheTypeMemory);
|
||||
expect(image.sd_isAnimated).beFalsy();
|
||||
expect(image == animatedImage).beFalsy();
|
||||
}];
|
||||
[[SDImageCache sharedImageCache] removeImageFromMemoryForKey:kTestGIFURL];
|
||||
}
|
||||
|
||||
- (void)test20InitialCacheSize{
|
||||
expect([[SDImageCache sharedImageCache] totalDiskSize]).to.equal(0);
|
||||
}
|
||||
|
@ -257,6 +287,7 @@ static NSString *kTestImageKeyPNG = @"TestImageKey.png";
|
|||
NSData *imageData = [image sd_imageDataAsFormat:SDImageFormatJPEG];
|
||||
[[SDImageCache sharedImageCache] storeImageDataToDisk:imageData forKey:kTestImageKeyJPEG];
|
||||
|
||||
expect([[SDImageCache sharedImageCache] diskImageDataExistsWithKey:kTestImageKeyJPEG]).beTruthy();
|
||||
UIImage *storedImageFromMemory = [[SDImageCache sharedImageCache] imageFromMemoryCacheForKey:kTestImageKeyJPEG];
|
||||
expect(storedImageFromMemory).to.equal(nil);
|
||||
|
||||
|
@ -381,6 +412,68 @@ static NSString *kTestImageKeyPNG = @"TestImageKey.png";
|
|||
expect(exist).beTruthy();
|
||||
}
|
||||
|
||||
- (void)test45DiskCacheRemoveExpiredData {
|
||||
NSString *cachePath = [[self userCacheDirectory] stringByAppendingPathComponent:@"disk"];
|
||||
SDImageCacheConfig *config = SDImageCacheConfig.defaultCacheConfig;
|
||||
config.maxDiskAge = 1; // 1 second
|
||||
config.maxDiskSize = 10; // 10 KB
|
||||
SDDiskCache *diskCache = [[SDDiskCache alloc] initWithCachePath:cachePath config:config];
|
||||
[diskCache removeAllData];
|
||||
expect(diskCache.totalSize).equal(0);
|
||||
expect(diskCache.totalCount).equal(0);
|
||||
// 20KB -> maxDiskSize
|
||||
NSUInteger length = 20;
|
||||
void *bytes = malloc(length);
|
||||
NSData *data = [NSData dataWithBytes:bytes length:length];
|
||||
free(bytes);
|
||||
[diskCache setData:data forKey:@"20KB"];
|
||||
expect(diskCache.totalSize).equal(length);
|
||||
expect(diskCache.totalCount).equal(1);
|
||||
[diskCache removeExpiredData];
|
||||
expect(diskCache.totalSize).equal(0);
|
||||
expect(diskCache.totalCount).equal(0);
|
||||
// 1KB with 5s -> maxDiskAge
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"SDDiskCache removeExpireData timeout"];
|
||||
length = 1;
|
||||
bytes = malloc(length);
|
||||
data = [NSData dataWithBytes:bytes length:length];
|
||||
free(bytes);
|
||||
[diskCache setData:data forKey:@"1KB"];
|
||||
expect(diskCache.totalSize).equal(length);
|
||||
expect(diskCache.totalCount).equal(1);
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
||||
[diskCache removeExpiredData];
|
||||
expect(diskCache.totalSize).equal(0);
|
||||
expect(diskCache.totalCount).equal(0);
|
||||
[expectation fulfill];
|
||||
});
|
||||
[self waitForExpectationsWithTimeout:5 handler:nil];
|
||||
}
|
||||
|
||||
#if SD_UIKIT
|
||||
- (void)test46MemoryCacheWeakCache {
|
||||
SDMemoryCache *memoryCache = [[SDMemoryCache alloc] init];
|
||||
memoryCache.config.shouldUseWeakMemoryCache = NO;
|
||||
memoryCache.config.maxMemoryCost = 10;
|
||||
memoryCache.config.maxMemoryCount = 5;
|
||||
expect(memoryCache.countLimit).equal(5);
|
||||
expect(memoryCache.totalCostLimit).equal(10);
|
||||
// Don't use weak cache
|
||||
NSObject *object = [NSObject new];
|
||||
[memoryCache setObject:object forKey:@"1"];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:UIApplicationDidReceiveMemoryWarningNotification object:nil];
|
||||
NSObject *cachedObject = [memoryCache objectForKey:@"1"];
|
||||
expect(cachedObject).beNil();
|
||||
// Use weak cache
|
||||
memoryCache.config.shouldUseWeakMemoryCache = YES;
|
||||
object = [NSObject new];
|
||||
[memoryCache setObject:object forKey:@"1"];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:UIApplicationDidReceiveMemoryWarningNotification object:nil];
|
||||
cachedObject = [memoryCache objectForKey:@"1"];
|
||||
expect(object).equal(cachedObject);
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma mark - SDImageCache & SDImageCachesManager
|
||||
- (void)test50SDImageCacheQueryOp {
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"SDImageCache query op works"];
|
||||
|
@ -586,6 +679,15 @@ static NSString *kTestImageKeyPNG = @"TestImageKey.png";
|
|||
return reusableImage;
|
||||
}
|
||||
|
||||
- (UIImage *)testGIFImage {
|
||||
static UIImage *reusableImage = nil;
|
||||
if (!reusableImage) {
|
||||
NSData *data = [NSData dataWithContentsOfFile:[self testGIFPath]];
|
||||
reusableImage = [UIImage sd_imageWithData:data];
|
||||
}
|
||||
return reusableImage;
|
||||
}
|
||||
|
||||
- (NSString *)testJPEGPath {
|
||||
NSBundle *testBundle = [NSBundle bundleForClass:[self class]];
|
||||
return [testBundle pathForResource:@"TestImage" ofType:@"jpg"];
|
||||
|
@ -596,6 +698,12 @@ static NSString *kTestImageKeyPNG = @"TestImageKey.png";
|
|||
return [testBundle pathForResource:@"TestImage" ofType:@"png"];
|
||||
}
|
||||
|
||||
- (NSString *)testGIFPath {
|
||||
NSBundle *testBundle = [NSBundle bundleForClass:[self class]];
|
||||
NSString *testPath = [testBundle pathForResource:@"TestImage" ofType:@"gif"];
|
||||
return testPath;
|
||||
}
|
||||
|
||||
- (nullable NSString *)userCacheDirectory {
|
||||
NSArray<NSString *> *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
|
||||
return paths.firstObject;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
- (void)test01ThatDecodedImageWithNilImageReturnsNil {
|
||||
expect([UIImage sd_decodedImageWithImage:nil]).to.beNil();
|
||||
expect([UIImage sd_decodedAndScaledDownImageWithImage:nil]).to.beNil();
|
||||
}
|
||||
|
||||
#if SD_UIKIT
|
||||
|
@ -120,6 +121,15 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void)test15ThatCodersManagerWorks {
|
||||
SDImageCodersManager *manager = [[SDImageCodersManager alloc] init];
|
||||
manager.coders = @[SDImageIOCoder.sharedCoder];
|
||||
expect([manager canDecodeFromData:nil]).beTruthy(); // Image/IO will return YES for future format
|
||||
expect([manager decodedImageWithData:nil options:nil]).beNil();
|
||||
expect([manager canEncodeToFormat:SDImageFormatWebP]).beFalsy();
|
||||
expect([manager encodedDataWithImage:nil format:SDImageFormatUndefined options:nil]).beNil();
|
||||
}
|
||||
|
||||
- (void)verifyCoder:(id<SDImageCoder>)coder
|
||||
withLocalImageURL:(NSURL *)imageUrl
|
||||
supportsEncoding:(BOOL)supportsEncoding
|
||||
|
|
|
@ -8,15 +8,9 @@
|
|||
*/
|
||||
|
||||
#import "SDTestCase.h"
|
||||
#import "UIColor+HexString.h"
|
||||
#import <CoreImage/CoreImage.h>
|
||||
|
||||
// Internal header
|
||||
@interface UIColor (HexString)
|
||||
|
||||
@property (nonatomic, copy, readonly, nonnull) NSString *sd_hexString;
|
||||
|
||||
@end
|
||||
|
||||
@interface SDImageTransformerTests : SDTestCase
|
||||
|
||||
@property (nonatomic, strong) UIImage *testImage;
|
||||
|
@ -163,13 +157,50 @@
|
|||
#endif
|
||||
CGFloat borderWidth = 1;
|
||||
UIColor *borderCoder = [UIColor blackColor];
|
||||
BOOL horizontal = YES;
|
||||
BOOL vertical = YES;
|
||||
CGRect cropRect = CGRectMake(0, 0, 50, 50);
|
||||
UIColor *tintColor = [UIColor clearColor];
|
||||
CGFloat blurRadius = 5;
|
||||
|
||||
SDImageResizingTransformer *transformer1 = [SDImageResizingTransformer transformerWithSize:size scaleMode:scaleMode];
|
||||
SDImageRotationTransformer *transformer2 = [SDImageRotationTransformer transformerWithAngle:angle fitSize:fitSize];
|
||||
SDImageRoundCornerTransformer *transformer3 = [SDImageRoundCornerTransformer transformerWithRadius:radius corners:corners borderWidth:borderWidth borderColor:borderCoder];
|
||||
SDImagePipelineTransformer *pipelineTransformer = [SDImagePipelineTransformer transformerWithTransformers:@[transformer1, transformer2, transformer3]];
|
||||
SDImageFlippingTransformer *transformer4 = [SDImageFlippingTransformer transformerWithHorizontal:horizontal vertical:vertical];
|
||||
SDImageCroppingTransformer *transformer5 = [SDImageCroppingTransformer transformerWithRect:cropRect];
|
||||
SDImageTintTransformer *transformer6 = [SDImageTintTransformer transformerWithColor:tintColor];
|
||||
SDImageBlurTransformer *transformer7 = [SDImageBlurTransformer transformerWithRadius:blurRadius];
|
||||
|
||||
CIFilter *filter = [CIFilter filterWithName:@"CIColorInvert"];
|
||||
SDImageFilterTransformer *transformer8 = [SDImageFilterTransformer transformerWithFilter:filter];
|
||||
|
||||
// Chain all built-in transformers for test case
|
||||
SDImagePipelineTransformer *pipelineTransformer = [SDImagePipelineTransformer transformerWithTransformers:@[
|
||||
transformer1,
|
||||
transformer2,
|
||||
transformer3,
|
||||
transformer4,
|
||||
transformer5,
|
||||
transformer6,
|
||||
transformer7,
|
||||
transformer8
|
||||
]];
|
||||
NSArray *transformerKeys = @[
|
||||
@"SDImageResizingTransformer({100.000000,100.000000},2)",
|
||||
@"SDImageRotationTransformer(0.785398,0)",
|
||||
@"SDImageRoundCornerTransformer(50.000000,18446744073709551615,1.000000,#ff000000)",
|
||||
@"SDImageFlippingTransformer(1,1)",
|
||||
@"SDImageCroppingTransformer({0.000000,0.000000,50.000000,50.000000})",
|
||||
@"SDImageTintTransformer(#00000000)",
|
||||
@"SDImageBlurTransformer(5.000000)",
|
||||
@"SDImageFilterTransformer(CIColorInvert)"
|
||||
];
|
||||
NSString *transformerKey = [transformerKeys componentsJoinedByString:@"-"]; // SDImageTransformerKeySeparator
|
||||
expect([pipelineTransformer.transformerKey isEqualToString:transformerKey]).beTruthy();
|
||||
|
||||
UIImage *transformedImage = [pipelineTransformer transformedImageWithImage:self.testImage forKey:@"Test"];
|
||||
expect(CGSizeEqualToSize(transformedImage.size, size)).beTruthy();
|
||||
expect(transformedImage).notTo.beNil();
|
||||
expect(CGSizeEqualToSize(transformedImage.size, cropRect.size)).beTruthy();
|
||||
}
|
||||
|
||||
- (void)test10TransformerKeyForCacheKey {
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* This file is part of the SDWebImage package.
|
||||
* (c) Olivier Poitrey <rs@dailymotion.com>
|
||||
* (c) Matt Galloway
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
#import "SDTestCase.h"
|
||||
#import "SDWeakProxy.h"
|
||||
#import "SDInternalMacros.h"
|
||||
|
||||
@interface SDUtilsTests : SDTestCase
|
||||
|
||||
@end
|
||||
|
||||
@implementation SDUtilsTests
|
||||
|
||||
- (void)testSDWeakProxy {
|
||||
NSObject *object = [NSObject new];
|
||||
SDWeakProxy *proxy = [SDWeakProxy proxyWithTarget:object];
|
||||
SEL sel = @selector(hash);
|
||||
NSMethodSignature *signature = [proxy methodSignatureForSelector:sel];
|
||||
NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
|
||||
[proxy forwardInvocation:invocation];
|
||||
void *returnValue;
|
||||
[invocation getReturnValue:&returnValue];
|
||||
expect(returnValue).beNil();
|
||||
expect([((NSObject *)proxy) forwardingTargetForSelector:sel]).equal(object);
|
||||
expect(proxy.isProxy).beTruthy();
|
||||
expect([proxy respondsToSelector:sel]).equal([object respondsToSelector:sel]);
|
||||
expect([proxy isEqual:object]).beTruthy();
|
||||
expect(proxy.hash).equal(object.hash);
|
||||
expect(proxy.superclass).equal(object.superclass);
|
||||
expect(proxy.class).equal(object.class);
|
||||
expect([proxy isKindOfClass:NSObject.class]).equal([object isKindOfClass:NSObject.class]);
|
||||
expect([proxy isMemberOfClass:NSObject.class]).equal([object isMemberOfClass:NSObject.class]);
|
||||
expect([proxy conformsToProtocol:@protocol(NSObject)]).equal([object conformsToProtocol:@protocol(NSObject)]);
|
||||
expect([proxy.description isEqualToString:object.description]).beTruthy();
|
||||
expect([proxy.debugDescription isEqualToString:object.debugDescription]).beTruthy();
|
||||
}
|
||||
|
||||
- (void)testSDScaledImageForKey {
|
||||
// Test nil
|
||||
expect(SDScaledImageForKey(nil, nil)).beNil();
|
||||
// Test @2x
|
||||
NSData *data = [NSData dataWithContentsOfFile:[self testGIFPath]];
|
||||
UIImage * image = [UIImage sd_imageWithGIFData:data];
|
||||
expect(image.sd_isAnimated).beTruthy();
|
||||
expect(image.scale).equal(1);
|
||||
|
||||
UIImage *scaledImage = SDScaledImageForKey(@"test@2x.gif", image);
|
||||
expect(scaledImage.scale).equal(2);
|
||||
}
|
||||
|
||||
- (void)testInternalMacro {
|
||||
@weakify(self);
|
||||
@onExit {
|
||||
@strongify(self);
|
||||
expect(self).notTo.beNil();
|
||||
};
|
||||
}
|
||||
|
||||
#pragma mark - Helper
|
||||
|
||||
- (NSString *)testJPEGPath {
|
||||
NSBundle *testBundle = [NSBundle bundleForClass:[self class]];
|
||||
return [testBundle pathForResource:@"TestImage" ofType:@"jpg"];
|
||||
}
|
||||
|
||||
- (NSString *)testGIFPath {
|
||||
NSBundle *testBundle = [NSBundle bundleForClass:[self class]];
|
||||
return [testBundle pathForResource:@"TestImage" ofType:@"gif"];
|
||||
}
|
||||
|
||||
@end
|
|
@ -31,6 +31,7 @@
|
|||
expect(imageView.image).to.equal(image);
|
||||
[expectation fulfill];
|
||||
}];
|
||||
expect(imageView.sd_imageURL).equal(originalImageURL);
|
||||
[self waitForExpectationsWithCommonTimeout];
|
||||
}
|
||||
|
||||
|
@ -119,6 +120,16 @@
|
|||
}];
|
||||
[self waitForExpectationsWithCommonTimeout];
|
||||
}
|
||||
|
||||
- (void)testUIButtonBackgroundImageCancelCurrentImageLoad {
|
||||
UIButton *button = [[UIButton alloc] init];
|
||||
NSURL *originalImageURL = [NSURL URLWithString:kTestJPEGURL];
|
||||
[button sd_setBackgroundImageWithURL:originalImageURL forState:UIControlStateNormal];
|
||||
[button sd_cancelBackgroundImageLoadForState:UIControlStateNormal];
|
||||
NSString *backgroundImageOperationKey = [self testBackgroundImageOperationKeyForState:UIControlStateNormal];
|
||||
expect([button sd_imageLoadOperationForKey:backgroundImageOperationKey]).beNil();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#if SD_MAC
|
||||
|
@ -189,6 +200,15 @@
|
|||
[self waitForExpectationsWithCommonTimeout];
|
||||
}
|
||||
|
||||
- (void)testUIViewCancelCurrentImageLoad {
|
||||
UIView *imageView = [[UIView alloc] init];
|
||||
NSURL *originalImageURL = [NSURL URLWithString:kTestJPEGURL];
|
||||
[imageView sd_internalSetImageWithURL:originalImageURL placeholderImage:nil options:0 context:nil setImageBlock:nil progress:nil completed:nil];
|
||||
[imageView sd_cancelCurrentImageLoad];
|
||||
NSString *operationKey = NSStringFromClass(UIView.class);
|
||||
expect([imageView sd_imageLoadOperationForKey:operationKey]).beNil();
|
||||
}
|
||||
|
||||
- (void)testUIViewImageProgressKVOWork {
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"UIView imageProgressKVO failed"];
|
||||
UIView *view = [[UIView alloc] init];
|
||||
|
@ -329,4 +349,10 @@
|
|||
return [testBundle pathForResource:@"TestImage" ofType:@"jpg"];
|
||||
}
|
||||
|
||||
#if SD_UIKIT
|
||||
- (NSString *)testBackgroundImageOperationKeyForState:(UIControlState)state {
|
||||
return [NSString stringWithFormat:@"UIButtonBackgroundImageOperation%lu", (unsigned long)state];
|
||||
}
|
||||
#endif
|
||||
|
||||
@end
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
}
|
||||
|
||||
- (void)test02ThatByDefaultDownloaderSetsTheAcceptHTTPHeader {
|
||||
expect([[SDWebImageDownloader sharedDownloader] valueForHTTPHeaderField:@"Accept"]).to.match(@"image/\\*");
|
||||
expect([[SDWebImageDownloader sharedDownloader] valueForHTTPHeaderField:@"Accept"]).to.match(@"image/\\*,\\*/\\*;q=0.8");
|
||||
}
|
||||
|
||||
- (void)test03ThatSetAndGetValueForHTTPHeaderFieldWork {
|
||||
|
@ -179,6 +179,24 @@
|
|||
[self waitForExpectationsWithCommonTimeout];
|
||||
}
|
||||
|
||||
- (void)test11ThatCancelAllDownloadWorks {
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"CancelAllDownloads"];
|
||||
|
||||
NSURL *imageURL = [NSURL URLWithString:kTestJPEGURL];
|
||||
[[SDWebImageDownloader sharedDownloader] downloadImageWithURL:imageURL completed:nil];
|
||||
expect([SDWebImageDownloader sharedDownloader].currentDownloadCount).to.equal(1);
|
||||
|
||||
[[SDWebImageDownloader sharedDownloader] cancelAllDownloads];
|
||||
|
||||
// doesn't cancel immediately - since it uses dispatch async
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, kMinDelayNanosecond), dispatch_get_main_queue(), ^{
|
||||
expect([SDWebImageDownloader sharedDownloader].currentDownloadCount).to.equal(0);
|
||||
[expectation fulfill];
|
||||
});
|
||||
|
||||
[self waitForExpectationsWithCommonTimeout];
|
||||
}
|
||||
|
||||
- (void)test12ThatWeCanUseAnotherSessionForEachDownloadOperation {
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"Owned session"];
|
||||
NSURL *url = [NSURL URLWithString:kTestJPEGURL];
|
||||
|
@ -443,6 +461,10 @@
|
|||
XCTestExpectation *expectation = [self expectationWithDescription:@"Custom image not works"];
|
||||
SDWebImageTestLoader *loader = [[SDWebImageTestLoader alloc] init];
|
||||
NSURL *imageURL = [NSURL URLWithString:kTestJPEGURL];
|
||||
expect([loader canRequestImageForURL:imageURL]).beTruthy();
|
||||
NSError *imageError = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCancelled userInfo:nil];
|
||||
expect([loader shouldBlockFailedURLWithURL:imageURL error:imageError]).equal(NO);
|
||||
|
||||
[loader requestImageWithURL:imageURL options:0 context:nil progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
|
||||
expect(targetURL).notTo.beNil();
|
||||
} completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) {
|
||||
|
@ -456,8 +478,17 @@
|
|||
|
||||
- (void)test31ThatLoadersManagerWorks {
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"Loaders manager not works"];
|
||||
SDWebImageTestLoader *loader = [[SDWebImageTestLoader alloc] init];
|
||||
SDImageLoadersManager *manager = [[SDImageLoadersManager alloc] init];
|
||||
[manager addLoader:loader];
|
||||
[manager removeLoader:loader];
|
||||
manager.loaders = @[SDWebImageDownloader.sharedDownloader, loader];
|
||||
NSURL *imageURL = [NSURL URLWithString:kTestJPEGURL];
|
||||
[[SDImageLoadersManager sharedManager] requestImageWithURL:imageURL options:0 context:nil progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
|
||||
expect([manager canRequestImageForURL:imageURL]).beTruthy();
|
||||
NSError *imageError = [NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorCancelled userInfo:nil];
|
||||
expect([manager shouldBlockFailedURLWithURL:imageURL error:imageError]).equal(NO);
|
||||
|
||||
[manager requestImageWithURL:imageURL options:0 context:nil progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
|
||||
expect(targetURL).notTo.beNil();
|
||||
} completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) {
|
||||
expect(error).to.beNil();
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
|
||||
// need a bigger image here, that is why we don't use kTestJPEGURL
|
||||
// if the image is too small, it will get downloaded before we can cancel :)
|
||||
NSURL *url = [NSURL URLWithString:@"https://s3.amazonaws.com/fast-image-cache/demo-images/FICDDemoImage001.jpg"];
|
||||
NSURL *url = [NSURL URLWithString:@"https://raw.githubusercontent.com/liyong03/YLGIFImage/master/YLGIFImageDemo/YLGIFImageDemo/joy.gif"];
|
||||
[[SDWebImageManager sharedManager] loadImageWithURL:url options:0 progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
|
||||
XCTFail(@"Should not get here");
|
||||
}];
|
||||
|
@ -185,6 +185,67 @@
|
|||
[self waitForExpectationsWithCommonTimeout];
|
||||
}
|
||||
|
||||
- (void)test11ThatOptionsProcessorWork {
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"Options processor work"];
|
||||
__block BOOL optionsProcessorCalled = NO;
|
||||
|
||||
SDWebImageManager *manager = [[SDWebImageManager alloc] initWithCache:[SDImageCache sharedImageCache] loader:[SDWebImageDownloader sharedDownloader]];
|
||||
manager.optionsProcessor = [SDWebImageOptionsProcessor optionsProcessorWithBlock:^SDWebImageOptionsResult * _Nullable(NSURL * _Nonnull url, SDWebImageOptions options, SDWebImageContext * _Nullable context) {
|
||||
if ([url.absoluteString isEqualToString:kTestPNGURL]) {
|
||||
optionsProcessorCalled = YES;
|
||||
return [[SDWebImageOptionsResult alloc] initWithOptions:0 context:@{SDWebImageContextImageScaleFactor : @(3)}];
|
||||
} else {
|
||||
return nil;
|
||||
}
|
||||
}];
|
||||
|
||||
NSURL *url = [NSURL URLWithString:kTestPNGURL];
|
||||
[[SDImageCache sharedImageCache] removeImageForKey:kTestPNGURL withCompletion:^{
|
||||
[manager loadImageWithURL:url options:0 progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
|
||||
expect(image.scale).equal(3);
|
||||
expect(optionsProcessorCalled).beTruthy();
|
||||
|
||||
[expectation fulfill];
|
||||
}];
|
||||
}];
|
||||
|
||||
[self waitForExpectationsWithCommonTimeout];
|
||||
}
|
||||
|
||||
- (void)test12ThatStoreCacheTypeWork {
|
||||
XCTestExpectation *expectation = [self expectationWithDescription:@"Image store cache type (including transformer) work"];
|
||||
|
||||
// Use a fresh manager && cache to avoid get effected by other test cases
|
||||
SDImageCache *cache = [[SDImageCache alloc] initWithNamespace:@"SDWebImageStoreCacheType"];
|
||||
SDWebImageManager *manager = [[SDWebImageManager alloc] initWithCache:cache loader:SDWebImageDownloader.sharedDownloader];
|
||||
SDWebImageTestTransformer *transformer = [[SDWebImageTestTransformer alloc] init];
|
||||
transformer.testImage = [[UIImage alloc] initWithContentsOfFile:[self testJPEGPath]];
|
||||
manager.transformer = transformer;
|
||||
|
||||
// test: original image -> disk only, transformed image -> memory only
|
||||
SDWebImageContext *context = @{SDWebImageContextOriginalStoreCacheType : @(SDImageCacheTypeDisk), SDWebImageContextStoreCacheType : @(SDImageCacheTypeMemory)};
|
||||
NSURL *url = [NSURL URLWithString:kTestJPEGURL];
|
||||
NSString *originalKey = [manager cacheKeyForURL:url];
|
||||
NSString *transformedKey = SDTransformedKeyForKey(originalKey, transformer.transformerKey);
|
||||
|
||||
[manager loadImageWithURL:url options:SDWebImageTransformAnimatedImage context:context progress:nil completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, SDImageCacheType cacheType, BOOL finished, NSURL * _Nullable imageURL) {
|
||||
expect(image).equal(transformer.testImage);
|
||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 2*kMinDelayNanosecond), dispatch_get_main_queue(), ^{
|
||||
// original -> disk only
|
||||
[manager.imageCache containsImageForKey:originalKey cacheType:SDImageCacheTypeAll completion:^(SDImageCacheType originalCacheType) {
|
||||
expect(originalCacheType).equal(SDImageCacheTypeDisk);
|
||||
// transformed -> memory only
|
||||
[manager.imageCache containsImageForKey:transformedKey cacheType:SDImageCacheTypeAll completion:^(SDImageCacheType transformedCacheType) {
|
||||
expect(transformedCacheType).equal(SDImageCacheTypeMemory);
|
||||
[expectation fulfill];
|
||||
}];
|
||||
}];
|
||||
});
|
||||
}];
|
||||
|
||||
[self waitForExpectationsWithCommonTimeout];
|
||||
}
|
||||
|
||||
- (NSString *)testJPEGPath {
|
||||
NSBundle *testBundle = [NSBundle bundleForClass:[self class]];
|
||||
return [testBundle pathForResource:@"TestImage" ofType:@"jpg"];
|
||||
|
|
|
@ -9,6 +9,12 @@
|
|||
|
||||
#import "SDTestCase.h"
|
||||
|
||||
@interface SDWebImagePrefetcher ()
|
||||
|
||||
@property (strong, atomic, nonnull) NSMutableSet<SDWebImagePrefetchToken *> *runningTokens;
|
||||
|
||||
@end
|
||||
|
||||
@interface SDWebImagePrefetcherTests : SDTestCase <SDWebImagePrefetcherDelegate>
|
||||
|
||||
@property (nonatomic, strong) SDWebImagePrefetcher *prefetcher;
|
||||
|
@ -134,6 +140,17 @@
|
|||
[self waitForExpectationsWithTimeout:kAsyncTestTimeout * 20 handler:nil];
|
||||
}
|
||||
|
||||
- (void)test06PrefetchCancelToken {
|
||||
NSArray *imageURLs = @[@"http://via.placeholder.com/20x20.jpg",
|
||||
@"http://via.placeholder.com/30x30.jpg",
|
||||
@"http://via.placeholder.com/40x40.jpg"];
|
||||
SDWebImagePrefetcher *prefetcher = [[SDWebImagePrefetcher alloc] init];
|
||||
SDWebImagePrefetchToken *token = [prefetcher prefetchURLs:imageURLs];
|
||||
expect(prefetcher.runningTokens.count).equal(1);
|
||||
[token cancel];
|
||||
expect(prefetcher.runningTokens.count).equal(0);
|
||||
}
|
||||
|
||||
- (void)imagePrefetcher:(SDWebImagePrefetcher *)imagePrefetcher didFinishWithTotalCount:(NSUInteger)totalCount skippedCount:(NSUInteger)skippedCount {
|
||||
expect(imagePrefetcher).to.equal(self.prefetcher);
|
||||
self.skippedCount = skippedCount;
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>5.0.2</string>
|
||||
<string>5.0.6</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>5.0.2</string>
|
||||
<string>5.0.6</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
/*
|
||||
* This file is part of the SDWebImage package.
|
||||
* (c) Olivier Poitrey <rs@dailymotion.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
#import "SDInternalMacros.h"
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue