Skip to content

Commit 4e4ecd6

Browse files
author
Olivier Poitrey
committed
Merge pull request SDWebImage#649 from finik/patch-1
Add typedef for cache operation complete block
2 parents 1293582 + b9bb555 commit 4e4ecd6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

SDWebImage/SDImageCache.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ typedef NS_ENUM(NSInteger, SDImageCacheType) {
2424
SDImageCacheTypeMemory
2525
};
2626

27+
typedef void(^SDWebImageQueryCompletedBlock)(UIImage *image, SDImageCacheType cacheType);
28+
2729
/**
2830
* SDImageCache maintains a memory cache and an optional disk cache. Disk cache write operations are performed
2931
* asynchronous so it doesn’t add unnecessary latency to the UI.
@@ -102,7 +104,7 @@ typedef NS_ENUM(NSInteger, SDImageCacheType) {
102104
*
103105
* @param key The unique key used to store the wanted image
104106
*/
105-
- (NSOperation *)queryDiskCacheForKey:(NSString *)key done:(void (^)(UIImage *image, SDImageCacheType cacheType))doneBlock;
107+
- (NSOperation *)queryDiskCacheForKey:(NSString *)key done:(SDWebImageQueryCompletedBlock)doneBlock;
106108

107109
/**
108110
* Query the memory cache synchronously.

0 commit comments

Comments
 (0)