Merge pull request #2326 from dreampiggy/renaming_image_loader

Renaming image loader
This commit is contained in:
DreamPiggy 2018-06-07 15:07:40 +08:00 committed by GitHub
commit b502ab7c44
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 169 additions and 170 deletions

View File

@ -49,30 +49,30 @@
320CAE1E2086F50500CFFC80 /* SDWebImageError.m in Sources */ = {isa = PBXBuildFile; fileRef = 320CAE142086F50500CFFC80 /* SDWebImageError.m */; }; 320CAE1E2086F50500CFFC80 /* SDWebImageError.m in Sources */ = {isa = PBXBuildFile; fileRef = 320CAE142086F50500CFFC80 /* SDWebImageError.m */; };
320CAE1F2086F50500CFFC80 /* SDWebImageError.m in Sources */ = {isa = PBXBuildFile; fileRef = 320CAE142086F50500CFFC80 /* SDWebImageError.m */; }; 320CAE1F2086F50500CFFC80 /* SDWebImageError.m in Sources */ = {isa = PBXBuildFile; fileRef = 320CAE142086F50500CFFC80 /* SDWebImageError.m */; };
320CAE202086F50500CFFC80 /* SDWebImageError.m in Sources */ = {isa = PBXBuildFile; fileRef = 320CAE142086F50500CFFC80 /* SDWebImageError.m */; }; 320CAE202086F50500CFFC80 /* SDWebImageError.m in Sources */ = {isa = PBXBuildFile; fileRef = 320CAE142086F50500CFFC80 /* SDWebImageError.m */; };
321B37812083290E00C0EA77 /* SDWebImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377D2083290D00C0EA77 /* SDWebImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 321B37812083290E00C0EA77 /* SDImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377D2083290D00C0EA77 /* SDImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; };
321B37822083290E00C0EA77 /* SDWebImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377D2083290D00C0EA77 /* SDWebImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 321B37822083290E00C0EA77 /* SDImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377D2083290D00C0EA77 /* SDImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; };
321B37832083290E00C0EA77 /* SDWebImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377D2083290D00C0EA77 /* SDWebImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 321B37832083290E00C0EA77 /* SDImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377D2083290D00C0EA77 /* SDImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; };
321B37842083290E00C0EA77 /* SDWebImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377D2083290D00C0EA77 /* SDWebImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 321B37842083290E00C0EA77 /* SDImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377D2083290D00C0EA77 /* SDImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; };
321B37852083290E00C0EA77 /* SDWebImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377D2083290D00C0EA77 /* SDWebImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 321B37852083290E00C0EA77 /* SDImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377D2083290D00C0EA77 /* SDImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; };
321B37862083290E00C0EA77 /* SDWebImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377D2083290D00C0EA77 /* SDWebImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; }; 321B37862083290E00C0EA77 /* SDImageLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377D2083290D00C0EA77 /* SDImageLoader.h */; settings = {ATTRIBUTES = (Public, ); }; };
321B37872083290E00C0EA77 /* SDWebImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B377E2083290D00C0EA77 /* SDWebImageLoader.m */; }; 321B37872083290E00C0EA77 /* SDImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B377E2083290D00C0EA77 /* SDImageLoader.m */; };
321B37882083290E00C0EA77 /* SDWebImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B377E2083290D00C0EA77 /* SDWebImageLoader.m */; }; 321B37882083290E00C0EA77 /* SDImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B377E2083290D00C0EA77 /* SDImageLoader.m */; };
321B37892083290E00C0EA77 /* SDWebImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B377E2083290D00C0EA77 /* SDWebImageLoader.m */; }; 321B37892083290E00C0EA77 /* SDImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B377E2083290D00C0EA77 /* SDImageLoader.m */; };
321B378A2083290E00C0EA77 /* SDWebImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B377E2083290D00C0EA77 /* SDWebImageLoader.m */; }; 321B378A2083290E00C0EA77 /* SDImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B377E2083290D00C0EA77 /* SDImageLoader.m */; };
321B378B2083290E00C0EA77 /* SDWebImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B377E2083290D00C0EA77 /* SDWebImageLoader.m */; }; 321B378B2083290E00C0EA77 /* SDImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B377E2083290D00C0EA77 /* SDImageLoader.m */; };
321B378C2083290E00C0EA77 /* SDWebImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B377E2083290D00C0EA77 /* SDWebImageLoader.m */; }; 321B378C2083290E00C0EA77 /* SDImageLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B377E2083290D00C0EA77 /* SDImageLoader.m */; };
321B378D2083290E00C0EA77 /* SDWebImageLoadersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377F2083290E00C0EA77 /* SDWebImageLoadersManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; 321B378D2083290E00C0EA77 /* SDImageLoadersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377F2083290E00C0EA77 /* SDImageLoadersManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
321B378E2083290E00C0EA77 /* SDWebImageLoadersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377F2083290E00C0EA77 /* SDWebImageLoadersManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; 321B378E2083290E00C0EA77 /* SDImageLoadersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377F2083290E00C0EA77 /* SDImageLoadersManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
321B378F2083290E00C0EA77 /* SDWebImageLoadersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377F2083290E00C0EA77 /* SDWebImageLoadersManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; 321B378F2083290E00C0EA77 /* SDImageLoadersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377F2083290E00C0EA77 /* SDImageLoadersManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
321B37902083290E00C0EA77 /* SDWebImageLoadersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377F2083290E00C0EA77 /* SDWebImageLoadersManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; 321B37902083290E00C0EA77 /* SDImageLoadersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377F2083290E00C0EA77 /* SDImageLoadersManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
321B37912083290E00C0EA77 /* SDWebImageLoadersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377F2083290E00C0EA77 /* SDWebImageLoadersManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; 321B37912083290E00C0EA77 /* SDImageLoadersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377F2083290E00C0EA77 /* SDImageLoadersManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
321B37922083290E00C0EA77 /* SDWebImageLoadersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377F2083290E00C0EA77 /* SDWebImageLoadersManager.h */; settings = {ATTRIBUTES = (Public, ); }; }; 321B37922083290E00C0EA77 /* SDImageLoadersManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 321B377F2083290E00C0EA77 /* SDImageLoadersManager.h */; settings = {ATTRIBUTES = (Public, ); }; };
321B37932083290E00C0EA77 /* SDWebImageLoadersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B37802083290E00C0EA77 /* SDWebImageLoadersManager.m */; }; 321B37932083290E00C0EA77 /* SDImageLoadersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B37802083290E00C0EA77 /* SDImageLoadersManager.m */; };
321B37942083290E00C0EA77 /* SDWebImageLoadersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B37802083290E00C0EA77 /* SDWebImageLoadersManager.m */; }; 321B37942083290E00C0EA77 /* SDImageLoadersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B37802083290E00C0EA77 /* SDImageLoadersManager.m */; };
321B37952083290E00C0EA77 /* SDWebImageLoadersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B37802083290E00C0EA77 /* SDWebImageLoadersManager.m */; }; 321B37952083290E00C0EA77 /* SDImageLoadersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B37802083290E00C0EA77 /* SDImageLoadersManager.m */; };
321B37962083290E00C0EA77 /* SDWebImageLoadersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B37802083290E00C0EA77 /* SDWebImageLoadersManager.m */; }; 321B37962083290E00C0EA77 /* SDImageLoadersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B37802083290E00C0EA77 /* SDImageLoadersManager.m */; };
321B37972083290E00C0EA77 /* SDWebImageLoadersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B37802083290E00C0EA77 /* SDWebImageLoadersManager.m */; }; 321B37972083290E00C0EA77 /* SDImageLoadersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B37802083290E00C0EA77 /* SDImageLoadersManager.m */; };
321B37982083290E00C0EA77 /* SDWebImageLoadersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B37802083290E00C0EA77 /* SDWebImageLoadersManager.m */; }; 321B37982083290E00C0EA77 /* SDImageLoadersManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 321B37802083290E00C0EA77 /* SDImageLoadersManager.m */; };
321DB3612011D4D70015D2CB /* NSButton+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 321DB35F2011D4D60015D2CB /* NSButton+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; 321DB3612011D4D70015D2CB /* NSButton+WebCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 321DB35F2011D4D60015D2CB /* NSButton+WebCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
321DB3622011D4D70015D2CB /* NSButton+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 321DB3602011D4D60015D2CB /* NSButton+WebCache.m */; }; 321DB3622011D4D70015D2CB /* NSButton+WebCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 321DB3602011D4D60015D2CB /* NSButton+WebCache.m */; };
321E60861F38E8C800405457 /* SDImageCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 321E60841F38E8C800405457 /* SDImageCoder.h */; settings = {ATTRIBUTES = (Public, ); }; }; 321E60861F38E8C800405457 /* SDImageCoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 321E60841F38E8C800405457 /* SDImageCoder.h */; settings = {ATTRIBUTES = (Public, ); }; };
@ -1545,10 +1545,10 @@
320224BA203979BA00E9F285 /* SDAnimatedImageRep.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDAnimatedImageRep.m; sourceTree = "<group>"; }; 320224BA203979BA00E9F285 /* SDAnimatedImageRep.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDAnimatedImageRep.m; sourceTree = "<group>"; };
320CAE132086F50500CFFC80 /* SDWebImageError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDWebImageError.h; sourceTree = "<group>"; }; 320CAE132086F50500CFFC80 /* SDWebImageError.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDWebImageError.h; sourceTree = "<group>"; };
320CAE142086F50500CFFC80 /* SDWebImageError.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDWebImageError.m; sourceTree = "<group>"; }; 320CAE142086F50500CFFC80 /* SDWebImageError.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDWebImageError.m; sourceTree = "<group>"; };
321B377D2083290D00C0EA77 /* SDWebImageLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDWebImageLoader.h; sourceTree = "<group>"; }; 321B377D2083290D00C0EA77 /* SDImageLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDImageLoader.h; sourceTree = "<group>"; };
321B377E2083290D00C0EA77 /* SDWebImageLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDWebImageLoader.m; sourceTree = "<group>"; }; 321B377E2083290D00C0EA77 /* SDImageLoader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDImageLoader.m; sourceTree = "<group>"; };
321B377F2083290E00C0EA77 /* SDWebImageLoadersManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDWebImageLoadersManager.h; sourceTree = "<group>"; }; 321B377F2083290E00C0EA77 /* SDImageLoadersManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDImageLoadersManager.h; sourceTree = "<group>"; };
321B37802083290E00C0EA77 /* SDWebImageLoadersManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDWebImageLoadersManager.m; sourceTree = "<group>"; }; 321B37802083290E00C0EA77 /* SDImageLoadersManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDImageLoadersManager.m; sourceTree = "<group>"; };
321DB35F2011D4D60015D2CB /* NSButton+WebCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSButton+WebCache.h"; path = "SDWebImage/NSButton+WebCache.h"; sourceTree = "<group>"; }; 321DB35F2011D4D60015D2CB /* NSButton+WebCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSButton+WebCache.h"; path = "SDWebImage/NSButton+WebCache.h"; sourceTree = "<group>"; };
321DB3602011D4D60015D2CB /* NSButton+WebCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSButton+WebCache.m"; path = "SDWebImage/NSButton+WebCache.m"; sourceTree = "<group>"; }; 321DB3602011D4D60015D2CB /* NSButton+WebCache.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSButton+WebCache.m"; path = "SDWebImage/NSButton+WebCache.m"; sourceTree = "<group>"; };
321E60841F38E8C800405457 /* SDImageCoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDImageCoder.h; sourceTree = "<group>"; }; 321E60841F38E8C800405457 /* SDImageCoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDImageCoder.h; sourceTree = "<group>"; };
@ -2185,10 +2185,10 @@
32B9B536206ED4230026769D /* SDWebImageDownloaderConfig.m */, 32B9B536206ED4230026769D /* SDWebImageDownloaderConfig.m */,
32F21B4F20788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.h */, 32F21B4F20788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.h */,
32F21B5020788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.m */, 32F21B5020788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.m */,
321B377D2083290D00C0EA77 /* SDWebImageLoader.h */, 321B377D2083290D00C0EA77 /* SDImageLoader.h */,
321B377E2083290D00C0EA77 /* SDWebImageLoader.m */, 321B377E2083290D00C0EA77 /* SDImageLoader.m */,
321B377F2083290E00C0EA77 /* SDWebImageLoadersManager.h */, 321B377F2083290E00C0EA77 /* SDImageLoadersManager.h */,
321B37802083290E00C0EA77 /* SDWebImageLoadersManager.m */, 321B37802083290E00C0EA77 /* SDImageLoadersManager.m */,
); );
name = Downloader; name = Downloader;
sourceTree = "<group>"; sourceTree = "<group>";
@ -2398,7 +2398,7 @@
32B9B53A206ED4230026769D /* SDWebImageDownloaderConfig.h in Headers */, 32B9B53A206ED4230026769D /* SDWebImageDownloaderConfig.h in Headers */,
328BB6AD2081FEE500760D6C /* SDWebImageCacheSerializer.h in Headers */, 328BB6AD2081FEE500760D6C /* SDWebImageCacheSerializer.h in Headers */,
80377C4A1F2F666300F89830 /* bit_writer_utils.h in Headers */, 80377C4A1F2F666300F89830 /* bit_writer_utils.h in Headers */,
321B37902083290E00C0EA77 /* SDWebImageLoadersManager.h in Headers */, 321B37902083290E00C0EA77 /* SDImageLoadersManager.h in Headers */,
323F8BE71F38EF770092B609 /* vp8li_enc.h in Headers */, 323F8BE71F38EF770092B609 /* vp8li_enc.h in Headers */,
329A185C1FFF5DFD008C9A2F /* UIImage+WebCache.h in Headers */, 329A185C1FFF5DFD008C9A2F /* UIImage+WebCache.h in Headers */,
4369C27A1D9807EC007E863A /* UIView+WebCache.h in Headers */, 4369C27A1D9807EC007E863A /* UIView+WebCache.h in Headers */,
@ -2441,7 +2441,7 @@
328BB6D02082581100760D6C /* SDMemoryCache.h in Headers */, 328BB6D02082581100760D6C /* SDMemoryCache.h in Headers */,
321E60891F38E8C800405457 /* SDImageCoder.h in Headers */, 321E60891F38E8C800405457 /* SDImageCoder.h in Headers */,
00733A721BC4880E00A5A117 /* UIView+WebCacheOperation.h in Headers */, 00733A721BC4880E00A5A117 /* UIView+WebCacheOperation.h in Headers */,
321B37842083290E00C0EA77 /* SDWebImageLoader.h in Headers */, 321B37842083290E00C0EA77 /* SDImageLoader.h in Headers */,
80377C481F2F666300F89830 /* bit_reader_utils.h in Headers */, 80377C481F2F666300F89830 /* bit_reader_utils.h in Headers */,
80377C511F2F666300F89830 /* huffman_encode_utils.h in Headers */, 80377C511F2F666300F89830 /* huffman_encode_utils.h in Headers */,
32484778201775F600AF9E5A /* SDAnimatedImage.h in Headers */, 32484778201775F600AF9E5A /* SDAnimatedImage.h in Headers */,
@ -2520,7 +2520,7 @@
4314D16F1D0E0E3B004B36C9 /* NSData+ImageContentType.h in Headers */, 4314D16F1D0E0E3B004B36C9 /* NSData+ImageContentType.h in Headers */,
80377C121F2F666300F89830 /* bit_reader_inl_utils.h in Headers */, 80377C121F2F666300F89830 /* bit_reader_inl_utils.h in Headers */,
4314D1701D0E0E3B004B36C9 /* mux.h in Headers */, 4314D1701D0E0E3B004B36C9 /* mux.h in Headers */,
321B378E2083290E00C0EA77 /* SDWebImageLoadersManager.h in Headers */, 321B378E2083290E00C0EA77 /* SDImageLoadersManager.h in Headers */,
321E60871F38E8C800405457 /* SDImageCoder.h in Headers */, 321E60871F38E8C800405457 /* SDImageCoder.h in Headers */,
80377EA21F2F66D400F89830 /* vp8i_dec.h in Headers */, 80377EA21F2F66D400F89830 /* vp8i_dec.h in Headers */,
320CAE162086F50500CFFC80 /* SDWebImageError.h in Headers */, 320CAE162086F50500CFFC80 /* SDWebImageError.h in Headers */,
@ -2529,7 +2529,7 @@
80377C211F2F666300F89830 /* quant_levels_dec_utils.h in Headers */, 80377C211F2F666300F89830 /* quant_levels_dec_utils.h in Headers */,
4314D1721D0E0E3B004B36C9 /* SDWebImageCompat.h in Headers */, 4314D1721D0E0E3B004B36C9 /* SDWebImageCompat.h in Headers */,
32484776201775F600AF9E5A /* SDAnimatedImage.h in Headers */, 32484776201775F600AF9E5A /* SDAnimatedImage.h in Headers */,
321B37822083290E00C0EA77 /* SDWebImageLoader.h in Headers */, 321B37822083290E00C0EA77 /* SDImageLoader.h in Headers */,
80377C251F2F666300F89830 /* random_utils.h in Headers */, 80377C251F2F666300F89830 /* random_utils.h in Headers */,
80377D4F1F2F66A700F89830 /* lossless.h in Headers */, 80377D4F1F2F66A700F89830 /* lossless.h in Headers */,
80377D511F2F66A700F89830 /* msa_macro.h in Headers */, 80377D511F2F66A700F89830 /* msa_macro.h in Headers */,
@ -2585,7 +2585,7 @@
isa = PBXHeadersBuildPhase; isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
321B37912083290E00C0EA77 /* SDWebImageLoadersManager.h in Headers */, 321B37912083290E00C0EA77 /* SDImageLoadersManager.h in Headers */,
80377C791F2F666400F89830 /* utils.h in Headers */, 80377C791F2F666400F89830 /* utils.h in Headers */,
328BB6A02081FED200760D6C /* SDWebImageCacheKeyFilter.h in Headers */, 328BB6A02081FED200760D6C /* SDWebImageCacheKeyFilter.h in Headers */,
323F8B721F38EF770092B609 /* delta_palettization_enc.h in Headers */, 323F8B721F38EF770092B609 /* delta_palettization_enc.h in Headers */,
@ -2598,7 +2598,7 @@
32484767201775F600AF9E5A /* SDAnimatedImageView+WebCache.h in Headers */, 32484767201775F600AF9E5A /* SDAnimatedImageView+WebCache.h in Headers */,
80377C601F2F666400F89830 /* bit_reader_inl_utils.h in Headers */, 80377C601F2F666400F89830 /* bit_reader_inl_utils.h in Headers */,
32FDE89920888726008D7530 /* UIImage+WebP.h in Headers */, 32FDE89920888726008D7530 /* UIImage+WebP.h in Headers */,
321B37852083290E00C0EA77 /* SDWebImageLoader.h in Headers */, 321B37852083290E00C0EA77 /* SDImageLoader.h in Headers */,
329A185D1FFF5DFD008C9A2F /* UIImage+WebCache.h in Headers */, 329A185D1FFF5DFD008C9A2F /* UIImage+WebCache.h in Headers */,
431BB6DC1D06D2C1006A3455 /* UIButton+WebCache.h in Headers */, 431BB6DC1D06D2C1006A3455 /* UIButton+WebCache.h in Headers */,
431BB6E11D06D2C1006A3455 /* SDWebImage.h in Headers */, 431BB6E11D06D2C1006A3455 /* SDWebImage.h in Headers */,
@ -2693,7 +2693,7 @@
32B9B53C206ED4230026769D /* SDWebImageDownloaderConfig.h in Headers */, 32B9B53C206ED4230026769D /* SDWebImageDownloaderConfig.h in Headers */,
328BB6AF2081FEE500760D6C /* SDWebImageCacheSerializer.h in Headers */, 328BB6AF2081FEE500760D6C /* SDWebImageCacheSerializer.h in Headers */,
4397D2BA1D0DDD8C00BB2784 /* demux.h in Headers */, 4397D2BA1D0DDD8C00BB2784 /* demux.h in Headers */,
321B37922083290E00C0EA77 /* SDWebImageLoadersManager.h in Headers */, 321B37922083290E00C0EA77 /* SDImageLoadersManager.h in Headers */,
80377C8F1F2F666400F89830 /* rescaler_utils.h in Headers */, 80377C8F1F2F666400F89830 /* rescaler_utils.h in Headers */,
4397D2BD1D0DDD8C00BB2784 /* types.h in Headers */, 4397D2BD1D0DDD8C00BB2784 /* types.h in Headers */,
4397D2C01D0DDD8C00BB2784 /* SDWebImage.h in Headers */, 4397D2C01D0DDD8C00BB2784 /* SDWebImage.h in Headers */,
@ -2739,7 +2739,7 @@
328BB6D22082581100760D6C /* SDMemoryCache.h in Headers */, 328BB6D22082581100760D6C /* SDMemoryCache.h in Headers */,
323F8BDD1F38EF770092B609 /* vp8i_enc.h in Headers */, 323F8BDD1F38EF770092B609 /* vp8i_enc.h in Headers */,
323F8B671F38EF770092B609 /* cost_enc.h in Headers */, 323F8B671F38EF770092B609 /* cost_enc.h in Headers */,
321B37862083290E00C0EA77 /* SDWebImageLoader.h in Headers */, 321B37862083290E00C0EA77 /* SDImageLoader.h in Headers */,
80377EE11F2F66D500F89830 /* vp8_dec.h in Headers */, 80377EE11F2F66D500F89830 /* vp8_dec.h in Headers */,
80377EE41F2F66D500F89830 /* vp8li_dec.h in Headers */, 80377EE41F2F66D500F89830 /* vp8li_dec.h in Headers */,
80377C931F2F666400F89830 /* utils.h in Headers */, 80377C931F2F666400F89830 /* utils.h in Headers */,
@ -2794,7 +2794,7 @@
32B9B539206ED4230026769D /* SDWebImageDownloaderConfig.h in Headers */, 32B9B539206ED4230026769D /* SDWebImageDownloaderConfig.h in Headers */,
328BB6AC2081FEE500760D6C /* SDWebImageCacheSerializer.h in Headers */, 328BB6AC2081FEE500760D6C /* SDWebImageCacheSerializer.h in Headers */,
80377C301F2F666300F89830 /* bit_writer_utils.h in Headers */, 80377C301F2F666300F89830 /* bit_writer_utils.h in Headers */,
321B378F2083290E00C0EA77 /* SDWebImageLoadersManager.h in Headers */, 321B378F2083290E00C0EA77 /* SDImageLoadersManager.h in Headers */,
431739541CDFC8B70008FEB9 /* types.h in Headers */, 431739541CDFC8B70008FEB9 /* types.h in Headers */,
323F8BE61F38EF770092B609 /* vp8li_enc.h in Headers */, 323F8BE61F38EF770092B609 /* vp8li_enc.h in Headers */,
329A185B1FFF5DFD008C9A2F /* UIImage+WebCache.h in Headers */, 329A185B1FFF5DFD008C9A2F /* UIImage+WebCache.h in Headers */,
@ -2839,7 +2839,7 @@
328BB6CF2082581100760D6C /* SDMemoryCache.h in Headers */, 328BB6CF2082581100760D6C /* SDMemoryCache.h in Headers */,
321E60881F38E8C800405457 /* SDImageCoder.h in Headers */, 321E60881F38E8C800405457 /* SDImageCoder.h in Headers */,
4A2CAE371AB4BB7500B6BC39 /* UIView+WebCacheOperation.h in Headers */, 4A2CAE371AB4BB7500B6BC39 /* UIView+WebCacheOperation.h in Headers */,
321B37832083290E00C0EA77 /* SDWebImageLoader.h in Headers */, 321B37832083290E00C0EA77 /* SDImageLoader.h in Headers */,
80377C2E1F2F666300F89830 /* bit_reader_utils.h in Headers */, 80377C2E1F2F666300F89830 /* bit_reader_utils.h in Headers */,
80377C371F2F666300F89830 /* huffman_encode_utils.h in Headers */, 80377C371F2F666300F89830 /* huffman_encode_utils.h in Headers */,
32484777201775F600AF9E5A /* SDAnimatedImage.h in Headers */, 32484777201775F600AF9E5A /* SDAnimatedImage.h in Headers */,
@ -2931,7 +2931,7 @@
321E60BE1F38E91700405457 /* UIImage+ForceDecode.h in Headers */, 321E60BE1F38E91700405457 /* UIImage+ForceDecode.h in Headers */,
5376131E155AD0D5005750A4 /* SDWebImagePrefetcher.h in Headers */, 5376131E155AD0D5005750A4 /* SDWebImagePrefetcher.h in Headers */,
32F7C06F2030114C00873181 /* SDImageTransformer.h in Headers */, 32F7C06F2030114C00873181 /* SDImageTransformer.h in Headers */,
321B378D2083290E00C0EA77 /* SDWebImageLoadersManager.h in Headers */, 321B378D2083290E00C0EA77 /* SDImageLoadersManager.h in Headers */,
32FDE8A220888789008D7530 /* SDWebImage.h in Headers */, 32FDE8A220888789008D7530 /* SDWebImage.h in Headers */,
324DF4B4200A14DC008A84CC /* SDWebImageDefine.h in Headers */, 324DF4B4200A14DC008A84CC /* SDWebImageDefine.h in Headers */,
80377CE11F2F66A100F89830 /* common_sse2.h in Headers */, 80377CE11F2F66A100F89830 /* common_sse2.h in Headers */,
@ -2958,7 +2958,7 @@
32FDE88F20888726008D7530 /* SDImageWebPCoder.h in Headers */, 32FDE88F20888726008D7530 /* SDImageWebPCoder.h in Headers */,
320CAE152086F50500CFFC80 /* SDWebImageError.h in Headers */, 320CAE152086F50500CFFC80 /* SDWebImageError.h in Headers */,
323F8B861F38EF770092B609 /* histogram_enc.h in Headers */, 323F8B861F38EF770092B609 /* histogram_enc.h in Headers */,
321B37812083290E00C0EA77 /* SDWebImageLoader.h in Headers */, 321B37812083290E00C0EA77 /* SDImageLoader.h in Headers */,
323F8BF61F38EF770092B609 /* animi.h in Headers */, 323F8BF61F38EF770092B609 /* animi.h in Headers */,
321E60861F38E8C800405457 /* SDImageCoder.h in Headers */, 321E60861F38E8C800405457 /* SDImageCoder.h in Headers */,
80377C0D1F2F665300F89830 /* rescaler_utils.h in Headers */, 80377C0D1F2F665300F89830 /* rescaler_utils.h in Headers */,
@ -3259,7 +3259,7 @@
80377DD71F2F66A700F89830 /* lossless_sse2.c in Sources */, 80377DD71F2F66A700F89830 /* lossless_sse2.c in Sources */,
80377DA81F2F66A700F89830 /* alpha_processing_mips_dsp_r2.c in Sources */, 80377DA81F2F66A700F89830 /* alpha_processing_mips_dsp_r2.c in Sources */,
80377DB11F2F66A700F89830 /* cost_mips_dsp_r2.c in Sources */, 80377DB11F2F66A700F89830 /* cost_mips_dsp_r2.c in Sources */,
321B37962083290E00C0EA77 /* SDWebImageLoadersManager.m in Sources */, 321B37962083290E00C0EA77 /* SDImageLoadersManager.m in Sources */,
80377C581F2F666300F89830 /* random_utils.c in Sources */, 80377C581F2F666300F89830 /* random_utils.c in Sources */,
323F8B591F38EF770092B609 /* config_enc.c in Sources */, 323F8B591F38EF770092B609 /* config_enc.c in Sources */,
80377DE91F2F66A700F89830 /* yuv_mips32.c in Sources */, 80377DE91F2F66A700F89830 /* yuv_mips32.c in Sources */,
@ -3319,7 +3319,7 @@
80377C561F2F666300F89830 /* quant_levels_utils.c in Sources */, 80377C561F2F666300F89830 /* quant_levels_utils.c in Sources */,
323F8BCF1F38EF770092B609 /* token_enc.c in Sources */, 323F8BCF1F38EF770092B609 /* token_enc.c in Sources */,
80377DD11F2F66A700F89830 /* lossless_enc_sse2.c in Sources */, 80377DD11F2F66A700F89830 /* lossless_enc_sse2.c in Sources */,
321B378A2083290E00C0EA77 /* SDWebImageLoader.m in Sources */, 321B378A2083290E00C0EA77 /* SDImageLoader.m in Sources */,
32484772201775F600AF9E5A /* SDAnimatedImage.m in Sources */, 32484772201775F600AF9E5A /* SDAnimatedImage.m in Sources */,
323F8C1D1F38EF770092B609 /* muxread.c in Sources */, 323F8C1D1F38EF770092B609 /* muxread.c in Sources */,
807A12311F89636300EC2A9B /* SDImageCodersManager.m in Sources */, 807A12311F89636300EC2A9B /* SDImageCodersManager.m in Sources */,
@ -3463,7 +3463,7 @@
80377E9C1F2F66D400F89830 /* idec_dec.c in Sources */, 80377E9C1F2F66D400F89830 /* idec_dec.c in Sources */,
323F8B7B1F38EF770092B609 /* frame_enc.c in Sources */, 323F8B7B1F38EF770092B609 /* frame_enc.c in Sources */,
80377D211F2F66A700F89830 /* alpha_processing_sse41.c in Sources */, 80377D211F2F66A700F89830 /* alpha_processing_sse41.c in Sources */,
321B37942083290E00C0EA77 /* SDWebImageLoadersManager.m in Sources */, 321B37942083290E00C0EA77 /* SDImageLoadersManager.m in Sources */,
323F8B8D1F38EF770092B609 /* iterator_enc.c in Sources */, 323F8B8D1F38EF770092B609 /* iterator_enc.c in Sources */,
3248475E201775F600AF9E5A /* SDAnimatedImageView.m in Sources */, 3248475E201775F600AF9E5A /* SDAnimatedImageView.m in Sources */,
80377D481F2F66A700F89830 /* lossless_enc_sse41.c in Sources */, 80377D481F2F66A700F89830 /* lossless_enc_sse41.c in Sources */,
@ -3524,7 +3524,7 @@
80377E991F2F66D400F89830 /* buffer_dec.c in Sources */, 80377E991F2F66D400F89830 /* buffer_dec.c in Sources */,
80377C201F2F666300F89830 /* quant_levels_dec_utils.c in Sources */, 80377C201F2F666300F89830 /* quant_levels_dec_utils.c in Sources */,
32F7C07F2030719600873181 /* UIImage+Transform.m in Sources */, 32F7C07F2030719600873181 /* UIImage+Transform.m in Sources */,
321B37882083290E00C0EA77 /* SDWebImageLoader.m in Sources */, 321B37882083290E00C0EA77 /* SDImageLoader.m in Sources */,
80377D471F2F66A700F89830 /* lossless_enc_sse2.c in Sources */, 80377D471F2F66A700F89830 /* lossless_enc_sse2.c in Sources */,
80377C1E1F2F666300F89830 /* huffman_utils.c in Sources */, 80377C1E1F2F666300F89830 /* huffman_utils.c in Sources */,
); );
@ -3630,7 +3630,7 @@
80377DF01F2F66A800F89830 /* alpha_processing_sse41.c in Sources */, 80377DF01F2F66A800F89830 /* alpha_processing_sse41.c in Sources */,
80377ECC1F2F66D500F89830 /* idec_dec.c in Sources */, 80377ECC1F2F66D500F89830 /* idec_dec.c in Sources */,
323F8B7E1F38EF770092B609 /* frame_enc.c in Sources */, 323F8B7E1F38EF770092B609 /* frame_enc.c in Sources */,
321B37972083290E00C0EA77 /* SDWebImageLoadersManager.m in Sources */, 321B37972083290E00C0EA77 /* SDImageLoadersManager.m in Sources */,
80377E171F2F66A800F89830 /* lossless_enc_sse41.c in Sources */, 80377E171F2F66A800F89830 /* lossless_enc_sse41.c in Sources */,
32484761201775F600AF9E5A /* SDAnimatedImageView.m in Sources */, 32484761201775F600AF9E5A /* SDAnimatedImageView.m in Sources */,
323F8B901F38EF770092B609 /* iterator_enc.c in Sources */, 323F8B901F38EF770092B609 /* iterator_enc.c in Sources */,
@ -3690,7 +3690,7 @@
80377EC91F2F66D500F89830 /* buffer_dec.c in Sources */, 80377EC91F2F66D500F89830 /* buffer_dec.c in Sources */,
80377C6C1F2F666400F89830 /* huffman_utils.c in Sources */, 80377C6C1F2F666400F89830 /* huffman_utils.c in Sources */,
32F7C0822030719600873181 /* UIImage+Transform.m in Sources */, 32F7C0822030719600873181 /* UIImage+Transform.m in Sources */,
321B378B2083290E00C0EA77 /* SDWebImageLoader.m in Sources */, 321B378B2083290E00C0EA77 /* SDImageLoader.m in Sources */,
80377E161F2F66A800F89830 /* lossless_enc_sse2.c in Sources */, 80377E161F2F66A800F89830 /* lossless_enc_sse2.c in Sources */,
431BB6C71D06D2C1006A3455 /* UIImageView+HighlightedWebCache.m in Sources */, 431BB6C71D06D2C1006A3455 /* UIImageView+HighlightedWebCache.m in Sources */,
); );
@ -3780,7 +3780,7 @@
32F21B5C20788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.m in Sources */, 32F21B5C20788D8C0036B1D5 /* SDWebImageDownloaderRequestModifier.m in Sources */,
32D122292080B2EB003685A3 /* SDImageCacheDefine.m in Sources */, 32D122292080B2EB003685A3 /* SDImageCacheDefine.m in Sources */,
80377E3B1F2F66A800F89830 /* cost_mips_dsp_r2.c in Sources */, 80377E3B1F2F66A800F89830 /* cost_mips_dsp_r2.c in Sources */,
321B378C2083290E00C0EA77 /* SDWebImageLoader.m in Sources */, 321B378C2083290E00C0EA77 /* SDImageLoader.m in Sources */,
4397D29B1D0DDD8C00BB2784 /* SDWebImageDownloader.m in Sources */, 4397D29B1D0DDD8C00BB2784 /* SDWebImageDownloader.m in Sources */,
80377E711F2F66A800F89830 /* upsampling.c in Sources */, 80377E711F2F66A800F89830 /* upsampling.c in Sources */,
328BB6A72081FED200760D6C /* SDWebImageCacheKeyFilter.m in Sources */, 328BB6A72081FED200760D6C /* SDWebImageCacheKeyFilter.m in Sources */,
@ -3857,7 +3857,7 @@
323F8B851F38EF770092B609 /* histogram_enc.c in Sources */, 323F8B851F38EF770092B609 /* histogram_enc.c in Sources */,
80377EE51F2F66D500F89830 /* webp_dec.c in Sources */, 80377EE51F2F66D500F89830 /* webp_dec.c in Sources */,
4397D2B01D0DDD8C00BB2784 /* SDImageCache.m in Sources */, 4397D2B01D0DDD8C00BB2784 /* SDImageCache.m in Sources */,
321B37982083290E00C0EA77 /* SDWebImageLoadersManager.m in Sources */, 321B37982083290E00C0EA77 /* SDImageLoadersManager.m in Sources */,
32F7C07A2030114C00873181 /* SDImageTransformer.m in Sources */, 32F7C07A2030114C00873181 /* SDImageTransformer.m in Sources */,
80377E4F1F2F66A800F89830 /* enc_sse41.c in Sources */, 80377E4F1F2F66A800F89830 /* enc_sse41.c in Sources */,
80377E701F2F66A800F89830 /* upsampling_sse2.c in Sources */, 80377E701F2F66A800F89830 /* upsampling_sse2.c in Sources */,
@ -3928,7 +3928,7 @@
80377D921F2F66A700F89830 /* lossless_sse2.c in Sources */, 80377D921F2F66A700F89830 /* lossless_sse2.c in Sources */,
80377D631F2F66A700F89830 /* alpha_processing_mips_dsp_r2.c in Sources */, 80377D631F2F66A700F89830 /* alpha_processing_mips_dsp_r2.c in Sources */,
80377D6C1F2F66A700F89830 /* cost_mips_dsp_r2.c in Sources */, 80377D6C1F2F66A700F89830 /* cost_mips_dsp_r2.c in Sources */,
321B37952083290E00C0EA77 /* SDWebImageLoadersManager.m in Sources */, 321B37952083290E00C0EA77 /* SDImageLoadersManager.m in Sources */,
4A2CAE361AB4BB7500B6BC39 /* UIImageView+WebCache.m in Sources */, 4A2CAE361AB4BB7500B6BC39 /* UIImageView+WebCache.m in Sources */,
323F8B581F38EF770092B609 /* config_enc.c in Sources */, 323F8B581F38EF770092B609 /* config_enc.c in Sources */,
43C892A21D9D6DDD0022038D /* demux.c in Sources */, 43C892A21D9D6DDD0022038D /* demux.c in Sources */,
@ -3988,7 +3988,7 @@
4A2CAE191AB4BB6400B6BC39 /* SDWebImageCompat.m in Sources */, 4A2CAE191AB4BB6400B6BC39 /* SDWebImageCompat.m in Sources */,
80377DA11F2F66A700F89830 /* upsampling_sse2.c in Sources */, 80377DA11F2F66A700F89830 /* upsampling_sse2.c in Sources */,
323F8BCE1F38EF770092B609 /* token_enc.c in Sources */, 323F8BCE1F38EF770092B609 /* token_enc.c in Sources */,
321B37892083290E00C0EA77 /* SDWebImageLoader.m in Sources */, 321B37892083290E00C0EA77 /* SDImageLoader.m in Sources */,
32484771201775F600AF9E5A /* SDAnimatedImage.m in Sources */, 32484771201775F600AF9E5A /* SDAnimatedImage.m in Sources */,
80377C3C1F2F666300F89830 /* quant_levels_utils.c in Sources */, 80377C3C1F2F666300F89830 /* quant_levels_utils.c in Sources */,
323F8C1C1F38EF770092B609 /* muxread.c in Sources */, 323F8C1C1F38EF770092B609 /* muxread.c in Sources */,
@ -4099,7 +4099,7 @@
80377CD91F2F66A100F89830 /* alpha_processing_mips_dsp_r2.c in Sources */, 80377CD91F2F66A100F89830 /* alpha_processing_mips_dsp_r2.c in Sources */,
80377CE21F2F66A100F89830 /* cost_mips_dsp_r2.c in Sources */, 80377CE21F2F66A100F89830 /* cost_mips_dsp_r2.c in Sources */,
5376130B155AD0D5005750A4 /* SDWebImageDownloader.m in Sources */, 5376130B155AD0D5005750A4 /* SDWebImageDownloader.m in Sources */,
321B37932083290E00C0EA77 /* SDWebImageLoadersManager.m in Sources */, 321B37932083290E00C0EA77 /* SDImageLoadersManager.m in Sources */,
323F8B561F38EF770092B609 /* config_enc.c in Sources */, 323F8B561F38EF770092B609 /* config_enc.c in Sources */,
43C8929B1D9D6DD70022038D /* demux.c in Sources */, 43C8929B1D9D6DD70022038D /* demux.c in Sources */,
80377D1A1F2F66A100F89830 /* yuv_mips32.c in Sources */, 80377D1A1F2F66A100F89830 /* yuv_mips32.c in Sources */,
@ -4158,7 +4158,7 @@
80377D171F2F66A100F89830 /* upsampling_sse2.c in Sources */, 80377D171F2F66A100F89830 /* upsampling_sse2.c in Sources */,
323F8BCC1F38EF770092B609 /* token_enc.c in Sources */, 323F8BCC1F38EF770092B609 /* token_enc.c in Sources */,
80377C081F2F665300F89830 /* quant_levels_utils.c in Sources */, 80377C081F2F665300F89830 /* quant_levels_utils.c in Sources */,
321B37872083290E00C0EA77 /* SDWebImageLoader.m in Sources */, 321B37872083290E00C0EA77 /* SDImageLoader.m in Sources */,
3248476F201775F600AF9E5A /* SDAnimatedImage.m in Sources */, 3248476F201775F600AF9E5A /* SDAnimatedImage.m in Sources */,
323F8C1A1F38EF770092B609 /* muxread.c in Sources */, 323F8C1A1F38EF770092B609 /* muxread.c in Sources */,
807A122E1F89636300EC2A9B /* SDImageCodersManager.m in Sources */, 807A122E1F89636300EC2A9B /* SDImageCodersManager.m in Sources */,

View File

@ -153,7 +153,7 @@
- (void)sd_setImageWithURL:(nullable NSURL *)url - (void)sd_setImageWithURL:(nullable NSURL *)url
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
@end @end

View File

@ -80,7 +80,7 @@
[self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock]; [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock];
} }
- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDExternalCompletionBlock)completedBlock { - (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDImageLoaderProgressBlock)progressBlock completed:(SDExternalCompletionBlock)completedBlock {
[self sd_setImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock]; [self sd_setImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock];
} }
@ -88,7 +88,7 @@
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock { completed:(nullable SDExternalCompletionBlock)completedBlock {
dispatch_group_t group = dispatch_group_create(); dispatch_group_t group = dispatch_group_create();
SDWebImageMutableContext *mutableContext; SDWebImageMutableContext *mutableContext;

View File

@ -123,7 +123,7 @@
- (void)sd_setImageWithURL:(nullable NSURL *)url - (void)sd_setImageWithURL:(nullable NSURL *)url
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
/** /**
@ -147,7 +147,7 @@
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
@end @end

View File

@ -40,7 +40,7 @@
[self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock]; [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock];
} }
- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock { - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock {
[self sd_setImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock]; [self sd_setImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock];
} }
@ -48,7 +48,7 @@
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock { completed:(nullable SDExternalCompletionBlock)completedBlock {
__weak typeof(self)weakSelf = self; __weak typeof(self)weakSelf = self;
[self sd_internalSetImageWithURL:url [self sd_internalSetImageWithURL:url

View File

@ -125,7 +125,7 @@
- (void)sd_setImageWithURL:(nullable NSURL *)url - (void)sd_setImageWithURL:(nullable NSURL *)url
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
/** /**
@ -149,7 +149,7 @@
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
#pragma mark - Alternate Image #pragma mark - Alternate Image
@ -263,7 +263,7 @@
- (void)sd_setAlternateImageWithURL:(nullable NSURL *)url - (void)sd_setAlternateImageWithURL:(nullable NSURL *)url
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
/** /**
@ -287,7 +287,7 @@
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
#pragma mark - Cancel #pragma mark - Cancel

View File

@ -44,7 +44,7 @@ static NSString * const SDAlternateImageOperationKey = @"NSButtonAlternateImageO
[self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock]; [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock];
} }
- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock { - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock {
[self sd_setImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock]; [self sd_setImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock];
} }
@ -52,7 +52,7 @@ static NSString * const SDAlternateImageOperationKey = @"NSButtonAlternateImageO
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock { completed:(nullable SDExternalCompletionBlock)completedBlock {
self.sd_currentImageURL = url; self.sd_currentImageURL = url;
[self sd_internalSetImageWithURL:url [self sd_internalSetImageWithURL:url
@ -94,7 +94,7 @@ static NSString * const SDAlternateImageOperationKey = @"NSButtonAlternateImageO
[self sd_setAlternateImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock]; [self sd_setAlternateImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock];
} }
- (void)sd_setAlternateImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock { - (void)sd_setAlternateImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock {
[self sd_setAlternateImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock]; [self sd_setAlternateImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock];
} }
@ -102,7 +102,7 @@ static NSString * const SDAlternateImageOperationKey = @"NSButtonAlternateImageO
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock { completed:(nullable SDExternalCompletionBlock)completedBlock {
self.sd_currentAlternateImageURL = url; self.sd_currentAlternateImageURL = url;

View File

@ -118,7 +118,7 @@
- (void)sd_setImageWithURL:(nullable NSURL *)url - (void)sd_setImageWithURL:(nullable NSURL *)url
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
/** /**
@ -142,7 +142,7 @@
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
@end @end

View File

@ -39,7 +39,7 @@
[self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock]; [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock];
} }
- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock { - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock {
[self sd_setImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock]; [self sd_setImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock];
} }
@ -47,7 +47,7 @@
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock { completed:(nullable SDExternalCompletionBlock)completedBlock {
Class animatedImageClass = [SDAnimatedImage class]; Class animatedImageClass = [SDAnimatedImage class];
SDWebImageMutableContext *mutableContext; SDWebImageMutableContext *mutableContext;

View File

@ -10,9 +10,8 @@
#import "SDWebImageDefine.h" #import "SDWebImageDefine.h"
#import "SDWebImageOperation.h" #import "SDWebImageOperation.h"
@protocol SDProgressiveImageCoder; typedef void(^SDImageLoaderProgressBlock)(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL);
typedef void(^SDWebImageLoaderProgressBlock)(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL); typedef void(^SDImageLoaderCompletedBlock)(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished);
typedef void(^SDWebImageLoaderCompletedBlock)(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished);
#pragma mark - Context Options #pragma mark - Context Options
@ -35,7 +34,7 @@ FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextLoader
@param context The context arg from the input @param context The context arg from the input
@return The decoded image for current image data load from the network @return The decoded image for current image data load from the network
*/ */
FOUNDATION_EXPORT UIImage * _Nullable SDWebImageLoaderDecodeImageData(NSData * _Nonnull imageData, NSURL * _Nonnull imageURL, SDWebImageOptions options, SDWebImageContext * _Nullable context); FOUNDATION_EXPORT UIImage * _Nullable SDImageLoaderDecodeImageData(NSData * _Nonnull imageData, NSURL * _Nonnull imageURL, SDWebImageOptions options, SDWebImageContext * _Nullable context);
/** /**
This is the built-in decoding process for image progressive download from network. It's used when `SDWebImageProgressiveLoad` option is set. (It's not required when your loader does not support progressive image loading) This is the built-in decoding process for image progressive download from network. It's used when `SDWebImageProgressiveLoad` option is set. (It's not required when your loader does not support progressive image loading)
@ -49,16 +48,16 @@ FOUNDATION_EXPORT UIImage * _Nullable SDWebImageLoaderDecodeImageData(NSData * _
@param context The context arg from the input @param context The context arg from the input
@return The decoded progressive image for current image data load from the network @return The decoded progressive image for current image data load from the network
*/ */
FOUNDATION_EXPORT UIImage * _Nullable SDWebImageLoaderDecodeProgressiveImageData(NSData * _Nonnull imageData, NSURL * _Nonnull imageURL, BOOL finished, id<SDWebImageOperation> _Nonnull operation, SDWebImageOptions options, SDWebImageContext * _Nullable context); FOUNDATION_EXPORT UIImage * _Nullable SDImageLoaderDecodeProgressiveImageData(NSData * _Nonnull imageData, NSURL * _Nonnull imageURL, BOOL finished, id<SDWebImageOperation> _Nonnull operation, SDWebImageOptions options, SDWebImageContext * _Nullable context);
#pragma mark - SDWebImageLoader #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. // 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 `SDWebImageLoaderDecodeImageData` or `SDWebImageLoaderDecodeProgressiveImageData` 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 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. // 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). // @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 SDWebImageLoader <NSObject> @protocol SDImageLoader <NSObject>
/** /**
Whether current image loader supports to load the provide image URL. Whether current image loader supports to load the provide image URL.
@ -83,7 +82,7 @@ FOUNDATION_EXPORT UIImage * _Nullable SDWebImageLoaderDecodeProgressiveImageData
- (nullable id<SDWebImageOperation>)loadImageWithURL:(nullable NSURL *)url - (nullable id<SDWebImageOperation>)loadImageWithURL:(nullable NSURL *)url
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageLoaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDWebImageLoaderCompletedBlock)completedBlock; completed:(nullable SDImageLoaderCompletedBlock)completedBlock;
@end @end

View File

@ -6,7 +6,7 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
#import "SDWebImageLoader.h" #import "SDImageLoader.h"
#import "SDWebImageCacheKeyFilter.h" #import "SDWebImageCacheKeyFilter.h"
#import "SDImageCodersManager.h" #import "SDImageCodersManager.h"
#import "SDImageCoderHelper.h" #import "SDImageCoderHelper.h"
@ -14,9 +14,9 @@
#import "UIImage+WebCache.h" #import "UIImage+WebCache.h"
#import "objc/runtime.h" #import "objc/runtime.h"
static void * SDWebImageLoaderProgressiveCoderKey = &SDWebImageLoaderProgressiveCoderKey; static void * SDImageLoaderProgressiveCoderKey = &SDImageLoaderProgressiveCoderKey;
UIImage * _Nullable SDWebImageLoaderDecodeImageData(NSData * _Nonnull imageData, NSURL * _Nonnull imageURL, SDWebImageOptions options, SDWebImageContext * _Nullable context) { UIImage * _Nullable SDImageLoaderDecodeImageData(NSData * _Nonnull imageData, NSURL * _Nonnull imageURL, SDWebImageOptions options, SDWebImageContext * _Nullable context) {
NSCParameterAssert(imageData); NSCParameterAssert(imageData);
NSCParameterAssert(imageURL); NSCParameterAssert(imageURL);
@ -72,7 +72,7 @@ UIImage * _Nullable SDWebImageLoaderDecodeImageData(NSData * _Nonnull imageData,
return image; return image;
} }
UIImage * _Nullable SDWebImageLoaderDecodeProgressiveImageData(NSData * _Nonnull imageData, NSURL * _Nonnull imageURL, BOOL finished, id<SDWebImageOperation> _Nonnull operation, SDWebImageOptions options, SDWebImageContext * _Nullable context) { UIImage * _Nullable SDImageLoaderDecodeProgressiveImageData(NSData * _Nonnull imageData, NSURL * _Nonnull imageURL, BOOL finished, id<SDWebImageOperation> _Nonnull operation, SDWebImageOptions options, SDWebImageContext * _Nullable context) {
NSCParameterAssert(imageData); NSCParameterAssert(imageData);
NSCParameterAssert(imageURL); NSCParameterAssert(imageURL);
NSCParameterAssert(operation); NSCParameterAssert(operation);
@ -91,7 +91,7 @@ UIImage * _Nullable SDWebImageLoaderDecodeProgressiveImageData(NSData * _Nonnull
if (scale < 1) { if (scale < 1) {
scale = 1; scale = 1;
} }
id<SDProgressiveImageCoder> progressiveCoder = objc_getAssociatedObject(operation, SDWebImageLoaderProgressiveCoderKey); id<SDProgressiveImageCoder> progressiveCoder = objc_getAssociatedObject(operation, SDImageLoaderProgressiveCoderKey);
if (!progressiveCoder) { if (!progressiveCoder) {
// We need to create a new instance for progressive decoding to avoid conflicts // We need to create a new instance for progressive decoding to avoid conflicts
for (id<SDImageCoder>coder in [SDImageCodersManager sharedManager].coders.reverseObjectEnumerator) { for (id<SDImageCoder>coder in [SDImageCodersManager sharedManager].coders.reverseObjectEnumerator) {
@ -101,7 +101,7 @@ UIImage * _Nullable SDWebImageLoaderDecodeProgressiveImageData(NSData * _Nonnull
break; break;
} }
} }
objc_setAssociatedObject(operation, SDWebImageLoaderProgressiveCoderKey, progressiveCoder, OBJC_ASSOCIATION_RETAIN_NONATOMIC); objc_setAssociatedObject(operation, SDImageLoaderProgressiveCoderKey, progressiveCoder, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
} }
// If we can't find any progressive coder, disable progressive download // If we can't find any progressive coder, disable progressive download
if (!progressiveCoder) { if (!progressiveCoder) {

View File

@ -6,29 +6,29 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
#import "SDWebImageLoader.h" #import "SDImageLoader.h"
@interface SDWebImageLoadersManager : NSObject <SDWebImageLoader> @interface SDImageLoadersManager : NSObject <SDImageLoader>
@property (nonatomic, class, readonly, nonnull) SDWebImageLoadersManager *sharedManager; @property (nonatomic, class, readonly, nonnull) SDImageLoadersManager *sharedManager;
/** /**
All image loaders in manager. The loaders array is a priority queue, which means the later added loader will have the highest priority All image loaders in manager. The loaders array is a priority queue, which means the later added loader will have the highest priority
*/ */
@property (nonatomic, copy, readwrite, nullable) NSArray<id<SDWebImageLoader>>* loaders; @property (nonatomic, copy, readwrite, nullable) NSArray<id<SDImageLoader>>* loaders;
/** /**
Add a new image loader to the end of loaders array. Which has the highest priority. Add a new image loader to the end of loaders array. Which has the highest priority.
@param loader loader @param loader loader
*/ */
- (void)addLoader:(nonnull id<SDWebImageLoader>)loader; - (void)addLoader:(nonnull id<SDImageLoader>)loader;
/** /**
Remove a image loader in the loaders array. Remove a image loader in the loaders array.
@param loader loader @param loader loader
*/ */
- (void)removeLoader:(nonnull id<SDWebImageLoader>)loader; - (void)removeLoader:(nonnull id<SDImageLoader>)loader;
@end @end

View File

@ -6,25 +6,25 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
#import "SDWebImageLoadersManager.h" #import "SDImageLoadersManager.h"
#import "SDWebImageDownloader.h" #import "SDWebImageDownloader.h"
#define LOCK(lock) dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER); #define LOCK(lock) dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER);
#define UNLOCK(lock) dispatch_semaphore_signal(lock); #define UNLOCK(lock) dispatch_semaphore_signal(lock);
@interface SDWebImageLoadersManager () @interface SDImageLoadersManager ()
@property (nonatomic, strong, nonnull) dispatch_semaphore_t loadersLock; @property (nonatomic, strong, nonnull) dispatch_semaphore_t loadersLock;
@end @end
@implementation SDWebImageLoadersManager @implementation SDImageLoadersManager
+ (SDWebImageLoadersManager *)sharedManager { + (SDImageLoadersManager *)sharedManager {
static dispatch_once_t onceToken; static dispatch_once_t onceToken;
static SDWebImageLoadersManager *manager; static SDImageLoadersManager *manager;
dispatch_once(&onceToken, ^{ dispatch_once(&onceToken, ^{
manager = [[SDWebImageLoadersManager alloc] init]; manager = [[SDImageLoadersManager alloc] init];
}); });
return manager; return manager;
} }
@ -41,12 +41,12 @@
#pragma mark - Loader Property #pragma mark - Loader Property
- (void)addLoader:(id<SDWebImageLoader>)loader { - (void)addLoader:(id<SDImageLoader>)loader {
if (![loader conformsToProtocol:@protocol(SDWebImageLoader)]) { if (![loader conformsToProtocol:@protocol(SDImageLoader)]) {
return; return;
} }
LOCK(self.loadersLock); LOCK(self.loadersLock);
NSMutableArray<id<SDWebImageLoader>> *mutableLoaders = [self.loaders mutableCopy]; NSMutableArray<id<SDImageLoader>> *mutableLoaders = [self.loaders mutableCopy];
if (!mutableLoaders) { if (!mutableLoaders) {
mutableLoaders = [NSMutableArray array]; mutableLoaders = [NSMutableArray array];
} }
@ -55,24 +55,24 @@
UNLOCK(self.loadersLock); UNLOCK(self.loadersLock);
} }
- (void)removeLoader:(id<SDWebImageLoader>)loader { - (void)removeLoader:(id<SDImageLoader>)loader {
if (![loader conformsToProtocol:@protocol(SDWebImageLoader)]) { if (![loader conformsToProtocol:@protocol(SDImageLoader)]) {
return; return;
} }
LOCK(self.loadersLock); LOCK(self.loadersLock);
NSMutableArray<id<SDWebImageLoader>> *mutableLoaders = [self.loaders mutableCopy]; NSMutableArray<id<SDImageLoader>> *mutableLoaders = [self.loaders mutableCopy];
[mutableLoaders removeObject:loader]; [mutableLoaders removeObject:loader];
self.loaders = [mutableLoaders copy]; self.loaders = [mutableLoaders copy];
UNLOCK(self.loadersLock); UNLOCK(self.loadersLock);
} }
#pragma mark - SDWebImageLoader #pragma mark - SDImageLoader
- (BOOL)canLoadWithURL:(nullable NSURL *)url { - (BOOL)canLoadWithURL:(nullable NSURL *)url {
LOCK(self.loadersLock); LOCK(self.loadersLock);
NSArray<id<SDWebImageLoader>> *loaders = self.loaders; NSArray<id<SDImageLoader>> *loaders = self.loaders;
UNLOCK(self.loadersLock); UNLOCK(self.loadersLock);
for (id<SDWebImageLoader> loader in loaders.reverseObjectEnumerator) { for (id<SDImageLoader> loader in loaders.reverseObjectEnumerator) {
if ([loader canLoadWithURL:url]) { if ([loader canLoadWithURL:url]) {
return YES; return YES;
} }
@ -80,14 +80,14 @@
return NO; return NO;
} }
- (id<SDWebImageOperation>)loadImageWithURL:(NSURL *)url options:(SDWebImageOptions)options context:(SDWebImageContext *)context progress:(SDWebImageLoaderProgressBlock)progressBlock completed:(SDWebImageLoaderCompletedBlock)completedBlock { - (id<SDWebImageOperation>)loadImageWithURL:(NSURL *)url options:(SDWebImageOptions)options context:(SDWebImageContext *)context progress:(SDImageLoaderProgressBlock)progressBlock completed:(SDImageLoaderCompletedBlock)completedBlock {
if (!url) { if (!url) {
return nil; return nil;
} }
LOCK(self.loadersLock); LOCK(self.loadersLock);
NSArray<id<SDWebImageLoader>> *loaders = self.loaders; NSArray<id<SDImageLoader>> *loaders = self.loaders;
UNLOCK(self.loadersLock); UNLOCK(self.loadersLock);
for (id<SDWebImageLoader> loader in loaders.reverseObjectEnumerator) { for (id<SDImageLoader> loader in loaders.reverseObjectEnumerator) {
if ([loader respondsToSelector:@selector(loadImageWithURL:options:context:progress:completed:)]) { if ([loader respondsToSelector:@selector(loadImageWithURL:options:context:progress:completed:)]) {
return [loader loadImageWithURL:url options:options context:context progress:progressBlock completed:completedBlock]; return [loader loadImageWithURL:url options:options context:context progress:progressBlock completed:completedBlock];
} }

View File

@ -12,7 +12,7 @@
#import "SDWebImageOperation.h" #import "SDWebImageOperation.h"
#import "SDWebImageDownloaderConfig.h" #import "SDWebImageDownloaderConfig.h"
#import "SDWebImageDownloaderRequestModifier.h" #import "SDWebImageDownloaderRequestModifier.h"
#import "SDWebImageLoader.h" #import "SDImageLoader.h"
typedef NS_OPTIONS(NSUInteger, SDWebImageDownloaderOptions) { typedef NS_OPTIONS(NSUInteger, SDWebImageDownloaderOptions) {
/** /**
@ -88,8 +88,8 @@ typedef NS_OPTIONS(NSUInteger, SDWebImageDownloaderOptions) {
FOUNDATION_EXPORT NSString * _Nonnull const SDWebImageDownloadStartNotification; FOUNDATION_EXPORT NSString * _Nonnull const SDWebImageDownloadStartNotification;
FOUNDATION_EXPORT NSString * _Nonnull const SDWebImageDownloadStopNotification; FOUNDATION_EXPORT NSString * _Nonnull const SDWebImageDownloadStopNotification;
typedef SDWebImageLoaderProgressBlock SDWebImageDownloaderProgressBlock; typedef SDImageLoaderProgressBlock SDWebImageDownloaderProgressBlock;
typedef SDWebImageLoaderCompletedBlock SDWebImageDownloaderCompletedBlock; typedef SDImageLoaderCompletedBlock SDWebImageDownloaderCompletedBlock;
/** /**
* A token associated with each download. Can be used to cancel a download * A token associated with each download. Can be used to cancel a download
@ -249,10 +249,10 @@ typedef SDWebImageLoaderCompletedBlock SDWebImageDownloaderCompletedBlock;
/** /**
SDWebImageDownloader is the built-in image loader conform to `SDWebImageLoader`. Which provide the HTTP/HTTPS/FTP download, or local file URL using NSURLSession. SDWebImageDownloader is the built-in image loader conform to `SDImageLoader`. Which provide the HTTP/HTTPS/FTP download, or local file URL using NSURLSession.
However, this downloader class itself also support customization for advanced users. You can specify `operationClass` in download config to custom download operation, See `SDWebImageDownloaderOperation`. However, this downloader class itself also support customization for advanced users. You can specify `operationClass` in download config to custom download operation, See `SDWebImageDownloaderOperation`.
If you want to provide some image loader which beyond network or local file, consider to create your own custom class conform to `SDWebImageLoader`. If you want to provide some image loader which beyond network or local file, consider to create your own custom class conform to `SDImageLoader`.
*/ */
@interface SDWebImageDownloader (SDWebImageLoader) <SDWebImageLoader> @interface SDWebImageDownloader (SDImageLoader) <SDImageLoader>
@end @end

View File

@ -464,7 +464,7 @@ didReceiveResponse:(NSURLResponse *)response
@end @end
@implementation SDWebImageDownloader (SDWebImageLoader) @implementation SDWebImageDownloader (SDImageLoader)
- (BOOL)canLoadWithURL:(NSURL *)url { - (BOOL)canLoadWithURL:(NSURL *)url {
if (!url) { if (!url) {
@ -474,7 +474,7 @@ didReceiveResponse:(NSURLResponse *)response
return YES; return YES;
} }
- (id<SDWebImageOperation>)loadImageWithURL:(NSURL *)url options:(SDWebImageOptions)options context:(SDWebImageContext *)context progress:(SDWebImageLoaderProgressBlock)progressBlock completed:(SDWebImageLoaderCompletedBlock)completedBlock { - (id<SDWebImageOperation>)loadImageWithURL:(NSURL *)url options:(SDWebImageOptions)options context:(SDWebImageContext *)context progress:(SDImageLoaderProgressBlock)progressBlock completed:(SDImageLoaderCompletedBlock)completedBlock {
UIImage *cachedImage; UIImage *cachedImage;
if ([context valueForKey:SDWebImageContextLoaderCachedImage]) { if ([context valueForKey:SDWebImageContextLoaderCachedImage]) {
cachedImage = [context valueForKey:SDWebImageContextLoaderCachedImage]; cachedImage = [context valueForKey:SDWebImageContextLoaderCachedImage];

View File

@ -345,7 +345,7 @@ didReceiveResponse:(NSURLResponse *)response
// progressive decode the image in coder queue // progressive decode the image in coder queue
dispatch_async(self.coderQueue, ^{ dispatch_async(self.coderQueue, ^{
UIImage *image = SDWebImageLoaderDecodeProgressiveImageData(imageData, self.request.URL, finished, self, [[self class] imageOptionsFromDownloaderOptions:self.options], self.context); UIImage *image = SDImageLoaderDecodeProgressiveImageData(imageData, self.request.URL, finished, self, [[self class] imageOptionsFromDownloaderOptions:self.options], self.context);
if (image) { if (image) {
// We do not keep the progressive decoding image even when `finished`=YES. Because they are for view rendering but not take full function from downloader options. And some coders implementation may not keep consistent between progressive decoding and normal decoding. // We do not keep the progressive decoding image even when `finished`=YES. Because they are for view rendering but not take full function from downloader options. And some coders implementation may not keep consistent between progressive decoding and normal decoding.
@ -412,7 +412,7 @@ didReceiveResponse:(NSURLResponse *)response
} else { } else {
// decode the image in coder queue // decode the image in coder queue
dispatch_async(self.coderQueue, ^{ dispatch_async(self.coderQueue, ^{
UIImage *image = SDWebImageLoaderDecodeImageData(imageData, self.request.URL, [[self class] imageOptionsFromDownloaderOptions:self.options], self.context); UIImage *image = SDImageLoaderDecodeImageData(imageData, self.request.URL, [[self class] imageOptionsFromDownloaderOptions:self.options], self.context);
CGSize imageSize = image.size; CGSize imageSize = image.size;
if (imageSize.width == 0 || imageSize.height == 0) { if (imageSize.width == 0 || imageSize.height == 0) {
[self callCompletionBlocksWithError:[NSError errorWithDomain:SDWebImageErrorDomain code:SDWebImageErrorBadImageData userInfo:@{NSLocalizedDescriptionKey : @"Downloaded image has 0 pixels"}]]; [self callCompletionBlocksWithError:[NSError errorWithDomain:SDWebImageErrorDomain code:SDWebImageErrorBadImageData userInfo:@{NSLocalizedDescriptionKey : @"Downloaded image has 0 pixels"}]];

View File

@ -9,11 +9,10 @@
#import "SDWebImageCompat.h" #import "SDWebImageCompat.h"
#import "SDWebImageOperation.h" #import "SDWebImageOperation.h"
#import "SDImageCacheDefine.h" #import "SDImageCacheDefine.h"
#import "SDWebImageDownloader.h" #import "SDImageLoader.h"
#import "SDImageTransformer.h" #import "SDImageTransformer.h"
#import "SDWebImageCacheKeyFilter.h" #import "SDWebImageCacheKeyFilter.h"
#import "SDWebImageCacheSerializer.h" #import "SDWebImageCacheSerializer.h"
#import "SDWebImageLoader.h"
typedef void(^SDExternalCompletionBlock)(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL); typedef void(^SDExternalCompletionBlock)(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL);
@ -105,7 +104,7 @@ SDWebImageManager *manager = [SDWebImageManager sharedManager];
/** /**
* The image loader used by manager to load image. * The image loader used by manager to load image.
*/ */
@property (strong, nonatomic, readonly, nonnull) id<SDWebImageLoader> imageLoader; @property (strong, nonatomic, readonly, nonnull) id<SDImageLoader> imageLoader;
/** /**
The image transformer for manager. It's used for image transform after the image load finished and store the transformed image to cache, see `SDImageTransformer`. The image transformer for manager. It's used for image transform after the image load finished and store the transformed image to cache, see `SDImageTransformer`.
@ -164,7 +163,7 @@ SDWebImageManager *manager = [SDWebImageManager sharedManager];
The default image loader for manager which is created with no arguments. Such as shared manager or init. The default image loader for manager which is created with no arguments. Such as shared manager or init.
Defaults to nil. Means using `SDWebImageDownloader.sharedDownloader` Defaults to nil. Means using `SDWebImageDownloader.sharedDownloader`
*/ */
@property (nonatomic, class, nullable) id<SDWebImageLoader> defaultImageLoader; @property (nonatomic, class, nullable) id<SDImageLoader> defaultImageLoader;
/** /**
* Returns global shared manager instance. * Returns global shared manager instance.
@ -175,7 +174,7 @@ SDWebImageManager *manager = [SDWebImageManager sharedManager];
* Allows to specify instance of cache and image loader used with image manager. * Allows to specify instance of cache and image loader used with image manager.
* @return new instance of `SDWebImageManager` with specified cache and loader. * @return new instance of `SDWebImageManager` with specified cache and loader.
*/ */
- (nonnull instancetype)initWithCache:(nonnull id<SDImageCache>)cache loader:(nonnull id<SDWebImageLoader>)loader NS_DESIGNATED_INITIALIZER; - (nonnull instancetype)initWithCache:(nonnull id<SDImageCache>)cache loader:(nonnull id<SDImageLoader>)loader NS_DESIGNATED_INITIALIZER;
/** /**
* Downloads the image at the given URL if not present in cache or return the cached version otherwise. * Downloads the image at the given URL if not present in cache or return the cached version otherwise.
@ -204,7 +203,7 @@ SDWebImageManager *manager = [SDWebImageManager sharedManager];
*/ */
- (nullable SDWebImageCombinedOperation *)loadImageWithURL:(nullable NSURL *)url - (nullable SDWebImageCombinedOperation *)loadImageWithURL:(nullable NSURL *)url
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nonnull SDInternalCompletionBlock)completedBlock; completed:(nonnull SDInternalCompletionBlock)completedBlock;
/** /**
@ -222,7 +221,7 @@ SDWebImageManager *manager = [SDWebImageManager sharedManager];
- (nullable SDWebImageCombinedOperation *)loadImageWithURL:(nullable NSURL *)url - (nullable SDWebImageCombinedOperation *)loadImageWithURL:(nullable NSURL *)url
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nonnull SDInternalCompletionBlock)completedBlock; completed:(nonnull SDInternalCompletionBlock)completedBlock;
/** /**

View File

@ -8,16 +8,15 @@
#import "SDWebImageManager.h" #import "SDWebImageManager.h"
#import "SDImageCache.h" #import "SDImageCache.h"
#import "NSImage+Compatibility.h" #import "SDWebImageDownloader.h"
#import "UIImage+WebCache.h" #import "UIImage+WebCache.h"
#import "SDAnimatedImage.h"
#import "SDWebImageError.h" #import "SDWebImageError.h"
#define LOCK(lock) dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER); #define LOCK(lock) dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER);
#define UNLOCK(lock) dispatch_semaphore_signal(lock); #define UNLOCK(lock) dispatch_semaphore_signal(lock);
static id<SDImageCache> _defaultImageCache; static id<SDImageCache> _defaultImageCache;
static id<SDWebImageLoader> _defaultImageLoader; static id<SDImageLoader> _defaultImageLoader;
@interface SDWebImageCombinedOperation () @interface SDWebImageCombinedOperation ()
@ -31,7 +30,7 @@ static id<SDWebImageLoader> _defaultImageLoader;
@interface SDWebImageManager () @interface SDWebImageManager ()
@property (strong, nonatomic, readwrite, nonnull) SDImageCache *imageCache; @property (strong, nonatomic, readwrite, nonnull) SDImageCache *imageCache;
@property (strong, nonatomic, readwrite, nonnull) id<SDWebImageLoader> imageLoader; @property (strong, nonatomic, readwrite, nonnull) id<SDImageLoader> imageLoader;
@property (strong, nonatomic, nonnull) NSMutableSet<NSURL *> *failedURLs; @property (strong, nonatomic, nonnull) NSMutableSet<NSURL *> *failedURLs;
@property (strong, nonatomic, nonnull) dispatch_semaphore_t failedURLsLock; // a lock to keep the access to `failedURLs` thread-safe @property (strong, nonatomic, nonnull) dispatch_semaphore_t failedURLsLock; // a lock to keep the access to `failedURLs` thread-safe
@property (strong, nonatomic, nonnull) NSMutableArray<SDWebImageCombinedOperation *> *runningOperations; @property (strong, nonatomic, nonnull) NSMutableArray<SDWebImageCombinedOperation *> *runningOperations;
@ -52,12 +51,12 @@ static id<SDWebImageLoader> _defaultImageLoader;
_defaultImageCache = defaultImageCache; _defaultImageCache = defaultImageCache;
} }
+ (id<SDWebImageLoader>)defaultImageLoader { + (id<SDImageLoader>)defaultImageLoader {
return _defaultImageLoader; return _defaultImageLoader;
} }
+ (void)setDefaultImageLoader:(id<SDWebImageLoader>)defaultImageLoader { + (void)setDefaultImageLoader:(id<SDImageLoader>)defaultImageLoader {
if (defaultImageLoader && ![defaultImageLoader conformsToProtocol:@protocol(SDWebImageLoader)]) { if (defaultImageLoader && ![defaultImageLoader conformsToProtocol:@protocol(SDImageLoader)]) {
return; return;
} }
_defaultImageLoader = defaultImageLoader; _defaultImageLoader = defaultImageLoader;
@ -77,14 +76,14 @@ static id<SDWebImageLoader> _defaultImageLoader;
if (!cache) { if (!cache) {
cache = [SDImageCache sharedImageCache]; cache = [SDImageCache sharedImageCache];
} }
id<SDWebImageLoader> loader = [[self class] defaultImageLoader]; id<SDImageLoader> loader = [[self class] defaultImageLoader];
if (!loader) { if (!loader) {
loader = [SDWebImageDownloader sharedDownloader]; loader = [SDWebImageDownloader sharedDownloader];
} }
return [self initWithCache:cache loader:loader]; return [self initWithCache:cache loader:loader];
} }
- (nonnull instancetype)initWithCache:(nonnull id<SDImageCache>)cache loader:(nonnull id<SDWebImageLoader>)loader { - (nonnull instancetype)initWithCache:(nonnull id<SDImageCache>)cache loader:(nonnull id<SDImageLoader>)loader {
if ((self = [super init])) { if ((self = [super init])) {
_imageCache = cache; _imageCache = cache;
_imageLoader = loader; _imageLoader = loader;
@ -116,14 +115,14 @@ static id<SDWebImageLoader> _defaultImageLoader;
return SDScaledImageForKey(key, image); return SDScaledImageForKey(key, image);
} }
- (SDWebImageCombinedOperation *)loadImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDInternalCompletionBlock)completedBlock { - (SDWebImageCombinedOperation *)loadImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDImageLoaderProgressBlock)progressBlock completed:(SDInternalCompletionBlock)completedBlock {
return [self loadImageWithURL:url options:options context:nil progress:progressBlock completed:completedBlock]; return [self loadImageWithURL:url options:options context:nil progress:progressBlock completed:completedBlock];
} }
- (SDWebImageCombinedOperation *)loadImageWithURL:(nullable NSURL *)url - (SDWebImageCombinedOperation *)loadImageWithURL:(nullable NSURL *)url
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nonnull SDInternalCompletionBlock)completedBlock { completed:(nonnull SDInternalCompletionBlock)completedBlock {
// Invoking this method without a completedBlock is pointless // Invoking this method without a completedBlock is pointless
NSAssert(completedBlock != nil, @"If you mean to prefetch the image, use -[SDWebImagePrefetcher prefetchURLs] instead"); NSAssert(completedBlock != nil, @"If you mean to prefetch the image, use -[SDWebImagePrefetcher prefetchURLs] instead");
@ -188,7 +187,7 @@ static id<SDWebImageLoader> _defaultImageLoader;
url:(nullable NSURL *)url url:(nullable NSURL *)url
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDInternalCompletionBlock)completedBlock { completed:(nullable SDInternalCompletionBlock)completedBlock {
// Check whether we should query cache // Check whether we should query cache
BOOL shouldQueryCache = (options & SDWebImageFromLoaderOnly) == 0; BOOL shouldQueryCache = (options & SDWebImageFromLoaderOnly) == 0;
@ -218,7 +217,7 @@ static id<SDWebImageLoader> _defaultImageLoader;
cachedImage:(nullable UIImage *)cachedImage cachedImage:(nullable UIImage *)cachedImage
cachedData:(nullable NSData *)cachedData cachedData:(nullable NSData *)cachedData
cacheType:(SDImageCacheType)cacheType cacheType:(SDImageCacheType)cacheType
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDInternalCompletionBlock)completedBlock { completed:(nullable SDInternalCompletionBlock)completedBlock {
// Check whether we should download image from network // Check whether we should download image from network
BOOL shouldDownload = (options & SDWebImageFromCacheOnly) == 0; BOOL shouldDownload = (options & SDWebImageFromCacheOnly) == 0;

View File

@ -149,7 +149,7 @@
forState:(UIControlState)state forState:(UIControlState)state
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
/** /**
@ -175,7 +175,7 @@
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
#pragma mark - Background Image #pragma mark - Background Image
@ -308,7 +308,7 @@
forState:(UIControlState)state forState:(UIControlState)state
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
/** /**
@ -333,7 +333,7 @@
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
#pragma mark - Cancel #pragma mark - Cancel

View File

@ -76,7 +76,7 @@ static inline NSString * backgroundImageOperationKeyForState(UIControlState stat
[self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:options progress:nil completed:completedBlock]; [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:options progress:nil completed:completedBlock];
} }
- (void)sd_setImageWithURL:(nullable NSURL *)url forState:(UIControlState)state placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock { - (void)sd_setImageWithURL:(nullable NSURL *)url forState:(UIControlState)state placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock {
[self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock]; [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock];
} }
@ -85,7 +85,7 @@ static inline NSString * backgroundImageOperationKeyForState(UIControlState stat
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock { completed:(nullable SDExternalCompletionBlock)completedBlock {
if (!url) { if (!url) {
[self.sd_imageURLStorage removeObjectForKey:imageURLKeyForState(state)]; [self.sd_imageURLStorage removeObjectForKey:imageURLKeyForState(state)];
@ -156,7 +156,7 @@ static inline NSString * backgroundImageOperationKeyForState(UIControlState stat
[self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 progress:nil completed:completedBlock]; [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 progress:nil completed:completedBlock];
} }
- (void)sd_setBackgroundImageWithURL:(nullable NSURL *)url forState:(UIControlState)state placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock { - (void)sd_setBackgroundImageWithURL:(nullable NSURL *)url forState:(UIControlState)state placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock {
[self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 context:nil progress:progressBlock completed:completedBlock]; [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 context:nil progress:progressBlock completed:completedBlock];
} }
@ -165,7 +165,7 @@ static inline NSString * backgroundImageOperationKeyForState(UIControlState stat
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock { completed:(nullable SDExternalCompletionBlock)completedBlock {
if (!url) { if (!url) {
[self.sd_imageURLStorage removeObjectForKey:backgroundImageURLKeyForState(state)]; [self.sd_imageURLStorage removeObjectForKey:backgroundImageURLKeyForState(state)];

View File

@ -86,7 +86,7 @@
*/ */
- (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
@end @end

View File

@ -33,14 +33,14 @@ static NSString * const SDHighlightedImageOperationKey = @"UIImageViewImageOpera
[self sd_setHighlightedImageWithURL:url options:options progress:nil completed:completedBlock]; [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:completedBlock];
} }
- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDExternalCompletionBlock)completedBlock { - (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDImageLoaderProgressBlock)progressBlock completed:(SDExternalCompletionBlock)completedBlock {
[self sd_setHighlightedImageWithURL:url options:options context:nil progress:progressBlock completed:completedBlock]; [self sd_setHighlightedImageWithURL:url options:options context:nil progress:progressBlock completed:completedBlock];
} }
- (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url - (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock { completed:(nullable SDExternalCompletionBlock)completedBlock {
__weak typeof(self)weakSelf = self; __weak typeof(self)weakSelf = self;
SDWebImageMutableContext *mutableContext; SDWebImageMutableContext *mutableContext;

View File

@ -148,7 +148,7 @@
- (void)sd_setImageWithURL:(nullable NSURL *)url - (void)sd_setImageWithURL:(nullable NSURL *)url
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
/** /**
@ -172,7 +172,7 @@
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock; completed:(nullable SDExternalCompletionBlock)completedBlock;
#if SD_UIKIT #if SD_UIKIT

View File

@ -37,7 +37,7 @@
[self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock]; [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock];
} }
- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock { - (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock {
[self sd_setImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock]; [self sd_setImageWithURL:url placeholderImage:placeholder options:options context:nil progress:progressBlock completed:completedBlock];
} }
@ -45,7 +45,7 @@
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDExternalCompletionBlock)completedBlock { completed:(nullable SDExternalCompletionBlock)completedBlock {
[self sd_internalSetImageWithURL:url [self sd_internalSetImageWithURL:url
placeholderImage:placeholder placeholderImage:placeholder

View File

@ -66,7 +66,7 @@ typedef void(^SDSetImageBlock)(UIImage * _Nullable image, NSData * _Nullable ima
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
setImageBlock:(nullable SDSetImageBlock)setImageBlock setImageBlock:(nullable SDSetImageBlock)setImageBlock
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDInternalCompletionBlock)completedBlock; completed:(nullable SDInternalCompletionBlock)completedBlock;
/** /**

View File

@ -40,7 +40,9 @@ const int64_t SDWebImageProgressUnitCountUnknown = 1LL;
placeholderImage:(nullable UIImage *)placeholder placeholderImage:(nullable UIImage *)placeholder
options:(SDWebImageOptions)options options:(SDWebImageOptions)options
context:(nullable SDWebImageContext *)context context:(nullable SDWebImageContext *)context
setImageBlock:(nullable SDSetImageBlock)setImageBlock progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock completed:(nullable SDInternalCompletionBlock)completedBlock { setImageBlock:(nullable SDSetImageBlock)setImageBlock
progress:(nullable SDImageLoaderProgressBlock)progressBlock
completed:(nullable SDInternalCompletionBlock)completedBlock {
context = [context copy]; // copy to avoid mutable object context = [context copy]; // copy to avoid mutable object
NSString *validOperationKey = nil; NSString *validOperationKey = nil;
if ([context valueForKey:SDWebImageContextSetImageOperationKey]) { if ([context valueForKey:SDWebImageContextSetImageOperationKey]) {
@ -90,7 +92,7 @@ const int64_t SDWebImageProgressUnitCountUnknown = 1LL;
} }
__weak __typeof(self)wself = self; __weak __typeof(self)wself = self;
SDWebImageDownloaderProgressBlock combinedProgressBlock = ^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) { SDImageLoaderProgressBlock combinedProgressBlock = ^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
__strong __typeof (wself) sself = wself; __strong __typeof (wself) sself = wself;
NSProgress *imageProgress = sself.sd_imageProgress; NSProgress *imageProgress = sself.sd_imageProgress;
imageProgress.totalUnitCount = expectedSize; imageProgress.totalUnitCount = expectedSize;

View File

@ -433,7 +433,7 @@
- (void)test31ThatLoadersManagerWorks { - (void)test31ThatLoadersManagerWorks {
XCTestExpectation *expectation = [self expectationWithDescription:@"Loaders manager not works"]; XCTestExpectation *expectation = [self expectationWithDescription:@"Loaders manager not works"];
NSURL *imageURL = [NSURL URLWithString:kTestJpegURL]; NSURL *imageURL = [NSURL URLWithString:kTestJpegURL];
[[SDWebImageLoadersManager sharedManager] loadImageWithURL:imageURL options:0 context:nil progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) { [[SDImageLoadersManager sharedManager] loadImageWithURL:imageURL options:0 context:nil progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
expect(targetURL).notTo.beNil(); expect(targetURL).notTo.beNil();
} completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) { } completed:^(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished) {
expect(error).to.beNil(); expect(error).to.beNil();

View File

@ -8,9 +8,9 @@
*/ */
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <SDWebImage/SDWebImageLoader.h> #import <SDWebImage/SDImageLoader.h>
// A really naive implementation of custom image loader using `NSURLSession` // A really naive implementation of custom image loader using `NSURLSession`
@interface SDWebImageTestLoader : NSObject <SDWebImageLoader> @interface SDWebImageTestLoader : NSObject <SDImageLoader>
@end @end

View File

@ -20,13 +20,13 @@
return YES; return YES;
} }
- (id<SDWebImageOperation>)loadImageWithURL:(NSURL *)url options:(SDWebImageOptions)options context:(SDWebImageContext *)context progress:(SDWebImageLoaderProgressBlock)progressBlock completed:(SDWebImageLoaderCompletedBlock)completedBlock { - (id<SDWebImageOperation>)loadImageWithURL:(NSURL *)url options:(SDWebImageOptions)options context:(SDWebImageContext *)context progress:(SDImageLoaderProgressBlock)progressBlock completed:(SDImageLoaderCompletedBlock)completedBlock {
NSURLRequest *request = [NSURLRequest requestWithURL:url]; NSURLRequest *request = [NSURLRequest requestWithURL:url];
NSURLSessionDataTask *task = [[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) { NSURLSessionDataTask *task = [[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
if (data) { if (data) {
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
UIImage *image = SDWebImageLoaderDecodeImageData(data, url, options, context); UIImage *image = SDImageLoaderDecodeImageData(data, url, options, context);
if (completedBlock) { if (completedBlock) {
completedBlock(image, data, nil, YES); completedBlock(image, data, nil, YES);
} }

View File

@ -36,8 +36,8 @@ FOUNDATION_EXPORT const unsigned char WebImageVersionString[];
#import <SDWebImage/SDWebImageDownloaderConfig.h> #import <SDWebImage/SDWebImageDownloaderConfig.h>
#import <SDWebImage/SDWebImageDownloaderOperation.h> #import <SDWebImage/SDWebImageDownloaderOperation.h>
#import <SDWebImage/SDWebImageDownloaderRequestModifier.h> #import <SDWebImage/SDWebImageDownloaderRequestModifier.h>
#import <SDWebImage/SDWebImageLoader.h> #import <SDWebImage/SDImageLoader.h>
#import <SDWebImage/SDWebImageLoadersManager.h> #import <SDWebImage/SDImageLoadersManager.h>
#import <SDWebImage/UIButton+WebCache.h> #import <SDWebImage/UIButton+WebCache.h>
#import <SDWebImage/SDWebImagePrefetcher.h> #import <SDWebImage/SDWebImagePrefetcher.h>
#import <SDWebImage/UIView+WebCacheOperation.h> #import <SDWebImage/UIView+WebCacheOperation.h>