Add `cancelCurrentImageLoading` method to UIImageView+WebCache

This commit is contained in:
Olivier Poitrey 2010-06-11 15:06:04 +02:00
parent 8cc6acb502
commit d128c27cad
2 changed files with 6 additions and 0 deletions

View File

@ -13,5 +13,6 @@
- (void)setImageWithURL:(NSURL *)url; - (void)setImageWithURL:(NSURL *)url;
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder; - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder;
- (void)cancelCurrentImageLoading;
@end @end

View File

@ -46,6 +46,11 @@
} }
} }
- (void)cancelCurrentImageLoading
{
[[SDWebImageManager sharedManager] cancelForDelegate:self];
}
- (void)webImageManager:(SDWebImageManager *)imageManager didFinishWithImage:(UIImage *)image - (void)webImageManager:(SDWebImageManager *)imageManager didFinishWithImage:(UIImage *)image
{ {
self.image = image; self.image = image;