Merge pull request #1504 from siburb/master

Added "cancelAllDownloads" method to SDWebImageDownloader.
This commit is contained in:
Bogdan Poplauschi 2016-05-08 18:41:36 +03:00
commit d6d9a5c233
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