Merge pull request #649 from finik/patch-1

Add typedef for cache operation complete block
This commit is contained in:
Olivier Poitrey 2014-03-10 00:02:17 -07:00
commit 4e4ecd6d02
1 changed files with 3 additions and 1 deletions

View File

@ -24,6 +24,8 @@ typedef NS_ENUM(NSInteger, SDImageCacheType) {
SDImageCacheTypeMemory
};
typedef void(^SDWebImageQueryCompletedBlock)(UIImage *image, SDImageCacheType cacheType);
/**
* SDImageCache maintains a memory cache and an optional disk cache. Disk cache write operations are performed
* asynchronous so it doesnt add unnecessary latency to the UI.
@ -102,7 +104,7 @@ typedef NS_ENUM(NSInteger, SDImageCacheType) {
*
* @param key The unique key used to store the wanted image
*/
- (NSOperation *)queryDiskCacheForKey:(NSString *)key done:(void (^)(UIImage *image, SDImageCacheType cacheType))doneBlock;
- (NSOperation *)queryDiskCacheForKey:(NSString *)key done:(SDWebImageQueryCompletedBlock)doneBlock;
/**
* Query the memory cache synchronously.