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 c185b7ee..384e0abd 100644 --- a/SDWebImage/SDWebImageManager.m +++ b/SDWebImage/SDWebImageManager.m @@ -134,6 +134,11 @@ [self.runningOperations removeAllObjects]; } +- (BOOL)isRunning +{ + return self.runningOperations.count > 0; +} + @end @implementation SDWebImageCombinedOperation