diff --git a/UIImageView+WebCache.h b/UIImageView+WebCache.h index 376269de..34c13ad0 100644 --- a/UIImageView+WebCache.h +++ b/UIImageView+WebCache.h @@ -13,5 +13,6 @@ - (void)setImageWithURL:(NSURL *)url; - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder; +- (void)cancelCurrentImageLoading; @end diff --git a/UIImageView+WebCache.m b/UIImageView+WebCache.m index 229782e0..6f79e5b3 100644 --- a/UIImageView+WebCache.m +++ b/UIImageView+WebCache.m @@ -46,6 +46,11 @@ } } +- (void)cancelCurrentImageLoading +{ + [[SDWebImageManager sharedManager] cancelForDelegate:self]; +} + - (void)webImageManager:(SDWebImageManager *)imageManager didFinishWithImage:(UIImage *)image { self.image = image;