diff --git a/SDWebImage/SDWebImageManager.h b/SDWebImage/SDWebImageManager.h index 9c7a753f..2afd6e1f 100644 --- a/SDWebImage/SDWebImageManager.h +++ b/SDWebImage/SDWebImageManager.h @@ -118,4 +118,9 @@ typedef void(^SDWebImageCompletedWithFinishedBlock)(UIImage *image, NSError *err */ - (void)cancelAll; +/** + * Check one or more operations running + */ +- (BOOL)isRunning; + @end diff --git a/SDWebImage/SDWebImageManager.m b/SDWebImage/SDWebImageManager.m index ca86f768..86dfa133 100644 --- a/SDWebImage/SDWebImageManager.m +++ b/SDWebImage/SDWebImageManager.m @@ -134,6 +134,11 @@ }); } +- (BOOL)isRunning +{ + return self.runningOperations.count > 0; +} + @end @implementation SDWebImageCombinedOperation