From e8b1532cbaeb7c5f2c37eaddf0a5dffcb4cb8927 Mon Sep 17 00:00:00 2001 From: kawanet Date: Tue, 25 Dec 2012 22:02:48 +0900 Subject: [PATCH] isRunning method added at SDWebImageManager --- SDWebImage/SDWebImageManager.h | 5 +++++ SDWebImage/SDWebImageManager.m | 5 +++++ 2 files changed, 10 insertions(+) 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