Skip to content

Commit

Permalink
Fix the name of the SDWebImageManagerDelegate protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Poitrey committed Sep 28, 2009
1 parent 2fa0626 commit 79c5fa1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion SDWebImageManager.h
Expand Up @@ -8,7 +8,7 @@

#import <UIKit/UIKit.h>
#import "SDWebImageDownloaderDelegate.h"
#import "SDWebImageHelperDelegate.h"
#import "SDWebImageManagerDelegate.h"

@interface SDWebImageManager : NSObject <SDWebImageDownloaderDelegate>
{
Expand Down
5 changes: 2 additions & 3 deletions SDWebImageManager.m
Expand Up @@ -92,7 +92,6 @@ - (void)cancelForDelegate:(id<SDWebImageManagerDelegate>)delegate

if (![downloaders containsObject:downloader])
{
NSLog(@"cancel download");
// No more delegate are waiting for this download, cancel it
[downloader cancel];
[downloaderForURL removeObjectForKey:downloader.url];
Expand All @@ -116,9 +115,9 @@ - (void)imageDownloader:(SDWebImageDownloader *)downloader didFinishWithImage:(U
{
id<SDWebImageManagerDelegate> delegate = [delegates objectAtIndex:index];

if (image && [delegate respondsToSelector:@selector(imageHelper:didFinishWithImage:)])
if (image && [delegate respondsToSelector:@selector(webImageManager:didFinishWithImage:)])
{
[delegate performSelector:@selector(imageHelper:didFinishWithImage:) withObject:self withObject:image];
[delegate performSelector:@selector(webImageManager:didFinishWithImage:) withObject:self withObject:image];
}

[downloaders removeObjectAtIndex:index];
Expand Down
2 changes: 1 addition & 1 deletion SDWebImageHelperDelegate.h → SDWebImageManagerDelegate.h
Expand Up @@ -12,6 +12,6 @@

@optional

- (void)imageHelper:(SDWebImageManager *)imageHelper didFinishWithImage:(UIImage *)image;
- (void)webImageManager:(SDWebImageManager *)imageManager didFinishWithImage:(UIImage *)image;

@end
2 changes: 1 addition & 1 deletion UIImageView+WebCache.h
Expand Up @@ -7,7 +7,7 @@
*/

#import <UIKit/UIKit.h>
#import "SDWebImageHelperDelegate.h"
#import "SDWebImageManagerDelegate.h"

@interface UIImageView (WebCache) <SDWebImageManagerDelegate>

Expand Down
2 changes: 1 addition & 1 deletion UIImageView+WebCache.m
Expand Up @@ -40,7 +40,7 @@ - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder
}
}

- (void)imageHelper:(SDWebImageManager *)imageHelper didFinishWithImage:(UIImage *)image
- (void)webImageManager:(SDWebImageManager *)imageManager didFinishWithImage:(UIImage *)image
{
self.image = image;
}
Expand Down

0 comments on commit 79c5fa1

Please sign in to comment.