Added "cancelAllDownloads" method to SDWebImageDownloader.

This commit is contained in:
Simon Burbidge 2016-03-21 13:16:05 +08:00
parent 16e1862afc
commit ed7df926ea
2 changed files with 9 additions and 0 deletions

View File

@ -188,4 +188,9 @@ typedef NSDictionary *(^SDWebImageDownloaderHeadersFilterBlock)(NSURL *url, NSDi
*/
- (void)setSuspended:(BOOL)suspended;
/**
* Cancels all download operations in the queue
*/
- (void)cancelAllDownloads;
@end

View File

@ -229,4 +229,8 @@ static NSString *const kCompletedCallbackKey = @"completed";
[self.downloadQueue setSuspended:suspended];
}
- (void)cancelAllDownloads {
[self.downloadQueue cancelAllOperations];
}
@end