...
|
...
|
@@ -8,11 +8,9 @@ |
|
|
|
|
|
#import "SDWebImageDownloader.h"
|
|
|
|
|
|
#ifdef ENABLE_SDWEBIMAGE_DECODER
|
|
|
#import "SDWebImageDecoder.h"
|
|
|
@interface SDWebImageDownloader (ImageDecoder) <SDWebImageDecoderDelegate>
|
|
|
@end
|
|
|
#endif
|
|
|
|
|
|
NSString *const SDWebImageDownloadStartNotification = @"SDWebImageDownloadStartNotification";
|
|
|
NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNotification";
|
...
|
...
|
@@ -126,12 +124,7 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot |
|
|
if ([delegate respondsToSelector:@selector(imageDownloader:didFinishWithImage:)])
|
|
|
{
|
|
|
UIImage *image = SDScaledImageForPath(url.absoluteString, imageData);
|
|
|
|
|
|
#ifdef ENABLE_SDWEBIMAGE_DECODER
|
|
|
[[SDWebImageDecoder sharedImageDecoder] decodeImage:image withDelegate:self userInfo:nil];
|
|
|
#else
|
|
|
[delegate performSelector:@selector(imageDownloader:didFinishWithImage:) withObject:self withObject:image];
|
|
|
#endif
|
|
|
SDWIRelease(image)
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -151,12 +144,10 @@ NSString *const SDWebImageDownloadStopNotification = @"SDWebImageDownloadStopNot |
|
|
|
|
|
#pragma mark SDWebImageDecoderDelegate
|
|
|
|
|
|
#ifdef ENABLE_SDWEBIMAGE_DECODER
|
|
|
- (void)imageDecoder:(SDWebImageDecoder *)decoder didFinishDecodingImage:(UIImage *)image userInfo:(NSDictionary *)userInfo
|
|
|
{
|
|
|
[delegate performSelector:@selector(imageDownloader:didFinishWithImage:) withObject:self withObject:image];
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
#pragma mark NSObject
|
|
|
|
...
|
...
|
|