Fix the name of the SDWebImageManagerDelegate protocol

This commit is contained in:
Olivier Poitrey 2009-09-28 23:56:24 +02:00
parent 2fa0626aaa
commit 79c5fa177d
5 changed files with 6 additions and 7 deletions

View File

@ -8,7 +8,7 @@
#import <UIKit/UIKit.h>
#import "SDWebImageDownloaderDelegate.h"
#import "SDWebImageHelperDelegate.h"
#import "SDWebImageManagerDelegate.h"
@interface SDWebImageManager : NSObject <SDWebImageDownloaderDelegate>
{

View File

@ -92,7 +92,6 @@ static SDWebImageManager *instance;
if (![downloaders containsObject:downloader])
{
NSLog(@"cancel download");
// No more delegate are waiting for this download, cancel it
[downloader cancel];
[downloaderForURL removeObjectForKey:downloader.url];
@ -116,9 +115,9 @@ static SDWebImageManager *instance;
{
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];

View File

@ -12,6 +12,6 @@
@optional
- (void)imageHelper:(SDWebImageManager *)imageHelper didFinishWithImage:(UIImage *)image;
- (void)webImageManager:(SDWebImageManager *)imageManager didFinishWithImage:(UIImage *)image;
@end

View File

@ -7,7 +7,7 @@
*/
#import <UIKit/UIKit.h>
#import "SDWebImageHelperDelegate.h"
#import "SDWebImageManagerDelegate.h"
@interface UIImageView (WebCache) <SDWebImageManagerDelegate>

View File

@ -40,7 +40,7 @@
}
}
- (void)imageHelper:(SDWebImageManager *)imageHelper didFinishWithImage:(UIImage *)image
- (void)webImageManager:(SDWebImageManager *)imageManager didFinishWithImage:(UIImage *)image
{
self.image = image;
}