Authored by Bogdan Poplauschi

For consistency with the previous change, also renamed `SDWebImageCompletionBloc…

…k` to `SDExternalCompletionBlock`
@@ -66,7 +66,7 @@ @@ -66,7 +66,7 @@
66 * indicating if the image was retrieved from the local cache or from the network. 66 * indicating if the image was retrieved from the local cache or from the network.
67 * The fourth parameter is the original image url. 67 * The fourth parameter is the original image url.
68 */ 68 */
69 -- (void)sd_setImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock; 69 +- (void)sd_setImageWithURL:(NSURL *)url completed:(SDExternalCompletionBlock)completedBlock;
70 70
71 /** 71 /**
72 * Set the imageView `image` with an `url`, placeholder. 72 * Set the imageView `image` with an `url`, placeholder.
@@ -81,7 +81,7 @@ @@ -81,7 +81,7 @@
81 * indicating if the image was retrieved from the local cache or from the network. 81 * indicating if the image was retrieved from the local cache or from the network.
82 * The fourth parameter is the original image url. 82 * The fourth parameter is the original image url.
83 */ 83 */
84 -- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock; 84 +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDExternalCompletionBlock)completedBlock;
85 85
86 /** 86 /**
87 * Set the imageView `image` with an `url`, placeholder and custom options. 87 * Set the imageView `image` with an `url`, placeholder and custom options.
@@ -97,7 +97,7 @@ @@ -97,7 +97,7 @@
97 * indicating if the image was retrieved from the local cache or from the network. 97 * indicating if the image was retrieved from the local cache or from the network.
98 * The fourth parameter is the original image url. 98 * The fourth parameter is the original image url.
99 */ 99 */
100 -- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock; 100 +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDExternalCompletionBlock)completedBlock;
101 101
102 /** 102 /**
103 * Cancel the current download 103 * Cancel the current download
@@ -30,15 +30,15 @@ static char imageURLKey; @@ -30,15 +30,15 @@ static char imageURLKey;
30 [self sd_setImageWithURL:url placeholderImage:placeholder options:options completed:nil]; 30 [self sd_setImageWithURL:url placeholderImage:placeholder options:options completed:nil];
31 } 31 }
32 32
33 -- (void)sd_setImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock { 33 +- (void)sd_setImageWithURL:(NSURL *)url completed:(SDExternalCompletionBlock)completedBlock {
34 [self sd_setImageWithURL:url placeholderImage:nil options:0 completed:completedBlock]; 34 [self sd_setImageWithURL:url placeholderImage:nil options:0 completed:completedBlock];
35 } 35 }
36 36
37 -- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock { 37 +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDExternalCompletionBlock)completedBlock {
38 [self sd_setImageWithURL:url placeholderImage:placeholder options:0 completed:completedBlock]; 38 [self sd_setImageWithURL:url placeholderImage:placeholder options:0 completed:completedBlock];
39 } 39 }
40 40
41 -- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock { 41 +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDExternalCompletionBlock)completedBlock {
42 [self sd_cancelCurrentImageLoad]; 42 [self sd_cancelCurrentImageLoad];
43 43
44 objc_setAssociatedObject(self, &imageURLKey, url, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 44 objc_setAssociatedObject(self, &imageURLKey, url, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
@@ -90,7 +90,7 @@ typedef NS_OPTIONS(NSUInteger, SDWebImageOptions) { @@ -90,7 +90,7 @@ typedef NS_OPTIONS(NSUInteger, SDWebImageOptions) {
90 SDWebImageAvoidAutoSetImage = 1 << 11 90 SDWebImageAvoidAutoSetImage = 1 << 11
91 }; 91 };
92 92
93 -typedef void(^SDWebImageCompletionBlock)(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL); 93 +typedef void(^SDExternalCompletionBlock)(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL);
94 94
95 typedef void(^SDInternalCompletionBlock)(UIImage *image, NSData *data, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL); 95 typedef void(^SDInternalCompletionBlock)(UIImage *image, NSData *data, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL);
96 96
@@ -73,7 +73,7 @@ @@ -73,7 +73,7 @@
73 * indicating if the image was retrieved from the local cache or from the network. 73 * indicating if the image was retrieved from the local cache or from the network.
74 * The fourth parameter is the original image url. 74 * The fourth parameter is the original image url.
75 */ 75 */
76 -- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletionBlock)completedBlock; 76 +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDExternalCompletionBlock)completedBlock;
77 77
78 /** 78 /**
79 * Set the imageView `image` with an `url`, placeholder. 79 * Set the imageView `image` with an `url`, placeholder.
@@ -89,7 +89,7 @@ @@ -89,7 +89,7 @@
89 * indicating if the image was retrieved from the local cache or from the network. 89 * indicating if the image was retrieved from the local cache or from the network.
90 * The fourth parameter is the original image url. 90 * The fourth parameter is the original image url.
91 */ 91 */
92 -- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock; 92 +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDExternalCompletionBlock)completedBlock;
93 93
94 /** 94 /**
95 * Set the imageView `image` with an `url`, placeholder and custom options. 95 * Set the imageView `image` with an `url`, placeholder and custom options.
@@ -106,7 +106,7 @@ @@ -106,7 +106,7 @@
106 * indicating if the image was retrieved from the local cache or from the network. 106 * indicating if the image was retrieved from the local cache or from the network.
107 * The fourth parameter is the original image url. 107 * The fourth parameter is the original image url.
108 */ 108 */
109 -- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock; 109 +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDExternalCompletionBlock)completedBlock;
110 110
111 /** 111 /**
112 * Set the backgroundImageView `image` with an `url`. 112 * Set the backgroundImageView `image` with an `url`.
@@ -155,7 +155,7 @@ @@ -155,7 +155,7 @@
155 * indicating if the image was retrieved from the local cache or from the network. 155 * indicating if the image was retrieved from the local cache or from the network.
156 * The fourth parameter is the original image url. 156 * The fourth parameter is the original image url.
157 */ 157 */
158 -- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletionBlock)completedBlock; 158 +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDExternalCompletionBlock)completedBlock;
159 159
160 /** 160 /**
161 * Set the backgroundImageView `image` with an `url`, placeholder. 161 * Set the backgroundImageView `image` with an `url`, placeholder.
@@ -171,7 +171,7 @@ @@ -171,7 +171,7 @@
171 * indicating if the image was retrieved from the local cache or from the network. 171 * indicating if the image was retrieved from the local cache or from the network.
172 * The fourth parameter is the original image url. 172 * The fourth parameter is the original image url.
173 */ 173 */
174 -- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock; 174 +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDExternalCompletionBlock)completedBlock;
175 175
176 /** 176 /**
177 * Set the backgroundImageView `image` with an `url`, placeholder and custom options. 177 * Set the backgroundImageView `image` with an `url`, placeholder and custom options.
@@ -187,7 +187,7 @@ @@ -187,7 +187,7 @@
187 * indicating if the image was retrieved from the local cache or from the network. 187 * indicating if the image was retrieved from the local cache or from the network.
188 * The fourth parameter is the original image url. 188 * The fourth parameter is the original image url.
189 */ 189 */
190 -- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock; 190 +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDExternalCompletionBlock)completedBlock;
191 191
192 /** 192 /**
193 * Cancel the current image download 193 * Cancel the current image download
@@ -40,15 +40,15 @@ static char imageURLStorageKey; @@ -40,15 +40,15 @@ static char imageURLStorageKey;
40 [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:options completed:nil]; 40 [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:options completed:nil];
41 } 41 }
42 42
43 -- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletionBlock)completedBlock { 43 +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDExternalCompletionBlock)completedBlock {
44 [self sd_setImageWithURL:url forState:state placeholderImage:nil options:0 completed:completedBlock]; 44 [self sd_setImageWithURL:url forState:state placeholderImage:nil options:0 completed:completedBlock];
45 } 45 }
46 46
47 -- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock { 47 +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDExternalCompletionBlock)completedBlock {
48 [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:completedBlock]; 48 [self sd_setImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:completedBlock];
49 } 49 }
50 50
51 -- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock { 51 +- (void)sd_setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDExternalCompletionBlock)completedBlock {
52 52
53 [self setImage:placeholder forState:state]; 53 [self setImage:placeholder forState:state];
54 [self sd_cancelImageLoadForState:state]; 54 [self sd_cancelImageLoadForState:state];
@@ -102,15 +102,15 @@ static char imageURLStorageKey; @@ -102,15 +102,15 @@ static char imageURLStorageKey;
102 [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:options completed:nil]; 102 [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:options completed:nil];
103 } 103 }
104 104
105 -- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletionBlock)completedBlock { 105 +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDExternalCompletionBlock)completedBlock {
106 [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:nil options:0 completed:completedBlock]; 106 [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:nil options:0 completed:completedBlock];
107 } 107 }
108 108
109 -- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock { 109 +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDExternalCompletionBlock)completedBlock {
110 [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:completedBlock]; 110 [self sd_setBackgroundImageWithURL:url forState:state placeholderImage:placeholder options:0 completed:completedBlock];
111 } 111 }
112 112
113 -- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock { 113 +- (void)sd_setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDExternalCompletionBlock)completedBlock {
114 [self sd_cancelBackgroundImageLoadForState:state]; 114 [self sd_cancelBackgroundImageLoadForState:state];
115 115
116 [self setBackgroundImage:placeholder forState:state]; 116 [self setBackgroundImage:placeholder forState:state];
@@ -46,7 +46,7 @@ @@ -46,7 +46,7 @@
46 * indicating if the image was retrieved from the local cache or from the network. 46 * indicating if the image was retrieved from the local cache or from the network.
47 * The fourth parameter is the original image url. 47 * The fourth parameter is the original image url.
48 */ 48 */
49 -- (void)sd_setHighlightedImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock; 49 +- (void)sd_setHighlightedImageWithURL:(NSURL *)url completed:(SDExternalCompletionBlock)completedBlock;
50 50
51 /** 51 /**
52 * Set the imageView `highlightedImage` with an `url` and custom options. 52 * Set the imageView `highlightedImage` with an `url` and custom options.
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 * indicating if the image was retrieved from the local cache or from the network. 61 * indicating if the image was retrieved from the local cache or from the network.
62 * The fourth parameter is the original image url. 62 * The fourth parameter is the original image url.
63 */ 63 */
64 -- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock; 64 +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDExternalCompletionBlock)completedBlock;
65 65
66 /** 66 /**
67 * Set the imageView `highlightedImage` with an `url` and custom options. 67 * Set the imageView `highlightedImage` with an `url` and custom options.
@@ -77,7 +77,7 @@ @@ -77,7 +77,7 @@
77 * indicating if the image was retrieved from the local cache or from the network. 77 * indicating if the image was retrieved from the local cache or from the network.
78 * The fourth parameter is the original image url. 78 * The fourth parameter is the original image url.
79 */ 79 */
80 -- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock; 80 +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDExternalCompletionBlock)completedBlock;
81 81
82 /** 82 /**
83 * Cancel the current download 83 * Cancel the current download
@@ -21,15 +21,15 @@ @@ -21,15 +21,15 @@
21 [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:nil]; 21 [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:nil];
22 } 22 }
23 23
24 -- (void)sd_setHighlightedImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock { 24 +- (void)sd_setHighlightedImageWithURL:(NSURL *)url completed:(SDExternalCompletionBlock)completedBlock {
25 [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:completedBlock]; 25 [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:completedBlock];
26 } 26 }
27 27
28 -- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock { 28 +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDExternalCompletionBlock)completedBlock {
29 [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:completedBlock]; 29 [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:completedBlock];
30 } 30 }
31 31
32 -- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock { 32 +- (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDExternalCompletionBlock)completedBlock {
33 [self sd_cancelCurrentHighlightedImageLoad]; 33 [self sd_cancelCurrentHighlightedImageLoad];
34 34
35 if (url) { 35 if (url) {
@@ -95,7 +95,7 @@ @@ -95,7 +95,7 @@
95 * indicating if the image was retrieved from the local cache or from the network. 95 * indicating if the image was retrieved from the local cache or from the network.
96 * The fourth parameter is the original image url. 96 * The fourth parameter is the original image url.
97 */ 97 */
98 -- (void)sd_setImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock; 98 +- (void)sd_setImageWithURL:(NSURL *)url completed:(SDExternalCompletionBlock)completedBlock;
99 99
100 /** 100 /**
101 * Set the imageView `image` with an `url`, placeholder. 101 * Set the imageView `image` with an `url`, placeholder.
@@ -110,7 +110,7 @@ @@ -110,7 +110,7 @@
110 * indicating if the image was retrieved from the local cache or from the network. 110 * indicating if the image was retrieved from the local cache or from the network.
111 * The fourth parameter is the original image url. 111 * The fourth parameter is the original image url.
112 */ 112 */
113 -- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock; 113 +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDExternalCompletionBlock)completedBlock;
114 114
115 /** 115 /**
116 * Set the imageView `image` with an `url`, placeholder and custom options. 116 * Set the imageView `image` with an `url`, placeholder and custom options.
@@ -126,7 +126,7 @@ @@ -126,7 +126,7 @@
126 * indicating if the image was retrieved from the local cache or from the network. 126 * indicating if the image was retrieved from the local cache or from the network.
127 * The fourth parameter is the original image url. 127 * The fourth parameter is the original image url.
128 */ 128 */
129 -- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock; 129 +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDExternalCompletionBlock)completedBlock;
130 130
131 /** 131 /**
132 * Set the imageView `image` with an `url`, placeholder and custom options. 132 * Set the imageView `image` with an `url`, placeholder and custom options.
@@ -143,7 +143,7 @@ @@ -143,7 +143,7 @@
143 * indicating if the image was retrieved from the local cache or from the network. 143 * indicating if the image was retrieved from the local cache or from the network.
144 * The fourth parameter is the original image url. 144 * The fourth parameter is the original image url.
145 */ 145 */
146 -- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock; 146 +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDExternalCompletionBlock)completedBlock;
147 147
148 /** 148 /**
149 * Set the imageView `image` with an `url` and optionally a placeholder image. 149 * Set the imageView `image` with an `url` and optionally a placeholder image.
@@ -160,7 +160,7 @@ @@ -160,7 +160,7 @@
160 * indicating if the image was retrieved from the local cache or from the network. 160 * indicating if the image was retrieved from the local cache or from the network.
161 * The fourth parameter is the original image url. 161 * The fourth parameter is the original image url.
162 */ 162 */
163 -- (void)sd_setImageWithPreviousCachedImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock; 163 +- (void)sd_setImageWithPreviousCachedImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDExternalCompletionBlock)completedBlock;
164 164
165 /** 165 /**
166 * Download an array of images and starts them in an animation loop 166 * Download an array of images and starts them in an animation loop
@@ -29,19 +29,19 @@ static char TAG_ACTIVITY_SHOW; @@ -29,19 +29,19 @@ static char TAG_ACTIVITY_SHOW;
29 [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:nil]; 29 [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:nil];
30 } 30 }
31 31
32 -- (void)sd_setImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock { 32 +- (void)sd_setImageWithURL:(NSURL *)url completed:(SDExternalCompletionBlock)completedBlock {
33 [self sd_setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:completedBlock]; 33 [self sd_setImageWithURL:url placeholderImage:nil options:0 progress:nil completed:completedBlock];
34 } 34 }
35 35
36 -- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletionBlock)completedBlock { 36 +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder completed:(SDExternalCompletionBlock)completedBlock {
37 [self sd_setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:completedBlock]; 37 [self sd_setImageWithURL:url placeholderImage:placeholder options:0 progress:nil completed:completedBlock];
38 } 38 }
39 39
40 -- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock { 40 +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDExternalCompletionBlock)completedBlock {
41 [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock]; 41 [self sd_setImageWithURL:url placeholderImage:placeholder options:options progress:nil completed:completedBlock];
42 } 42 }
43 43
44 -- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock { 44 +- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDExternalCompletionBlock)completedBlock {
45 [self sd_cancelCurrentImageLoad]; 45 [self sd_cancelCurrentImageLoad];
46 objc_setAssociatedObject(self, &imageURLKey, url, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 46 objc_setAssociatedObject(self, &imageURLKey, url, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
47 47
@@ -95,7 +95,7 @@ static char TAG_ACTIVITY_SHOW; @@ -95,7 +95,7 @@ static char TAG_ACTIVITY_SHOW;
95 } 95 }
96 } 96 }
97 97
98 -- (void)sd_setImageWithPreviousCachedImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock { 98 +- (void)sd_setImageWithPreviousCachedImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDExternalCompletionBlock)completedBlock {
99 NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:url]; 99 NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:url];
100 UIImage *lastPreviousCachedImage = [[SDImageCache sharedImageCache] imageFromDiskCacheForKey:key]; 100 UIImage *lastPreviousCachedImage = [[SDImageCache sharedImageCache] imageFromDiskCacheForKey:key];
101 101