mirror of
https://github.com/zhigang1992/PINRemoteImage.git
synced 2026-06-19 01:46:10 +08:00
Rename downloadProgress: to progressDownload:
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
@property (nonatomic, strong, nullable) PINRemoteImageManagerImageCompletion completionBlock;
|
||||
@property (nonatomic, strong, nullable) PINRemoteImageManagerImageCompletion progressImageBlock;
|
||||
@property (nonatomic, strong, nullable) PINRemoteImageManagerDownloadProgress downloadProgressBlock;
|
||||
@property (nonatomic, strong, nullable) PINRemoteImageManagerDownloadProgress progressDownloadBlock;
|
||||
@property (nonatomic, assign) CFTimeInterval requestTime;
|
||||
|
||||
@end
|
||||
|
||||
@@ -315,14 +315,14 @@ typedef void(^PINRemoteImageManagerDownloadProgress)(NSInteger completedBytes, N
|
||||
|
||||
@param url NSURL where the image to download resides.
|
||||
@param options PINRemoteImageManagerDownloadOptions options with which to fetch the image.
|
||||
@param downloadProgress PINRemoteImageManagerDownloadProgress block which will be called to update progress in bytes of the image download. NOTE: For performance reasons, this block is not called on the main thread every time, if you need to update your UI ensure that you dispatch to the main thread first.
|
||||
@param progressDownload PINRemoteImageManagerDownloadProgress block which will be called to update progress in bytes of the image download. NOTE: For performance reasons, this block is not called on the main thread every time, if you need to update your UI ensure that you dispatch to the main thread first.
|
||||
@param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache or downloaded.
|
||||
|
||||
@return An NSUUID which uniquely identifies this request. To be used for canceling requests and verifying that the callback is for the request you expect (see categories for example).
|
||||
*/
|
||||
- (nullable NSUUID *)downloadImageWithURL:(nonnull NSURL *)url
|
||||
options:(PINRemoteImageManagerDownloadOptions)options
|
||||
downloadProgress:(nullable PINRemoteImageManagerDownloadProgress)downloadProgress
|
||||
progressDownload:(nullable PINRemoteImageManagerDownloadProgress)progressDownload
|
||||
completion:(nullable PINRemoteImageManagerImageCompletion)completion;
|
||||
|
||||
/**
|
||||
@@ -331,7 +331,7 @@ typedef void(^PINRemoteImageManagerDownloadProgress)(NSInteger completedBytes, N
|
||||
@param url NSURL where the image to download resides.
|
||||
@param options PINRemoteImageManagerDownloadOptions options with which to fetch the image.
|
||||
@param progressImage PINRemoteImageManagerImageCompletion block which will be called to update progress of the image download.
|
||||
@param downloadProgress PINRemoteImageManagerDownloadProgress block which will be called to update progress in bytes of the image download. NOTE: For performance reasons, this block is not called on the main thread every time, if you need to update your UI ensure that you dispatch to the main thread first.
|
||||
@param progressDownload PINRemoteImageManagerDownloadProgress block which will be called to update progress in bytes of the image download. NOTE: For performance reasons, this block is not called on the main thread every time, if you need to update your UI ensure that you dispatch to the main thread first.
|
||||
@param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache or downloaded.
|
||||
|
||||
@return An NSUUID which uniquely identifies this request. To be used for canceling requests and verifying that the callback is for the request you expect (see categories for example).
|
||||
@@ -339,7 +339,7 @@ typedef void(^PINRemoteImageManagerDownloadProgress)(NSInteger completedBytes, N
|
||||
- (nullable NSUUID *)downloadImageWithURL:(nonnull NSURL *)url
|
||||
options:(PINRemoteImageManagerDownloadOptions)options
|
||||
progressImage:(nullable PINRemoteImageManagerImageCompletion)progressImage
|
||||
downloadProgress:(nullable PINRemoteImageManagerDownloadProgress)downloadProgress
|
||||
progressDownload:(nullable PINRemoteImageManagerDownloadProgress)progressDownload
|
||||
completion:(nullable PINRemoteImageManagerImageCompletion)completion;
|
||||
|
||||
/**
|
||||
@@ -365,7 +365,7 @@ typedef void(^PINRemoteImageManagerDownloadProgress)(NSInteger completedBytes, N
|
||||
@param url NSURL where the image to download resides.
|
||||
@param options PINRemoteImageManagerDownloadOptions options with which to fetch the image.
|
||||
@param processorKey NSString key to uniquely identify processor and process. Will be used for caching processed images.
|
||||
@param downloadProgress PINRemoteImageManagerDownloadProgress block which will be called to update progress in bytes of the image download. NOTE: For performance reasons, this block is not called on the main thread every time, if you need to update your UI ensure that you dispatch to the main thread first.
|
||||
@param progressDownload PINRemoteImageManagerDownloadProgress block which will be called to update progress in bytes of the image download. NOTE: For performance reasons, this block is not called on the main thread every time, if you need to update your UI ensure that you dispatch to the main thread first.
|
||||
@param processor PINRemoteImageManagerImageProcessor block which will be called to post-process downloaded image.
|
||||
@param completion PINRemoteImageManagerImageCompletion block to call when image has been fetched from the cache or downloaded.
|
||||
|
||||
@@ -375,7 +375,7 @@ typedef void(^PINRemoteImageManagerDownloadProgress)(NSInteger completedBytes, N
|
||||
options:(PINRemoteImageManagerDownloadOptions)options
|
||||
processorKey:(nullable NSString *)processorKey
|
||||
processor:(nullable PINRemoteImageManagerImageProcessor)processor
|
||||
downloadProgress:(nullable PINRemoteImageManagerDownloadProgress)downloadProgress
|
||||
progressDownload:(nullable PINRemoteImageManagerDownloadProgress)progressDownload
|
||||
completion:(nullable PINRemoteImageManagerImageCompletion)completion;
|
||||
|
||||
/**
|
||||
|
||||
@@ -382,14 +382,14 @@ static dispatch_once_t sharedDispatchToken;
|
||||
processorKey:nil
|
||||
processor:nil
|
||||
progressImage:progressImage
|
||||
downloadProgress:nil
|
||||
progressDownload:nil
|
||||
completion:completion
|
||||
inputUUID:nil];
|
||||
}
|
||||
|
||||
- (NSUUID *)downloadImageWithURL:(NSURL *)url
|
||||
options:(PINRemoteImageManagerDownloadOptions)options
|
||||
downloadProgress:(PINRemoteImageManagerDownloadProgress)downloadProgress
|
||||
progressDownload:(PINRemoteImageManagerDownloadProgress)progressDownload
|
||||
completion:(PINRemoteImageManagerImageCompletion)completion
|
||||
{
|
||||
return [self downloadImageWithURL:url
|
||||
@@ -398,7 +398,7 @@ static dispatch_once_t sharedDispatchToken;
|
||||
processorKey:nil
|
||||
processor:nil
|
||||
progressImage:nil
|
||||
downloadProgress:downloadProgress
|
||||
progressDownload:progressDownload
|
||||
completion:completion
|
||||
inputUUID:nil];
|
||||
}
|
||||
@@ -406,7 +406,7 @@ static dispatch_once_t sharedDispatchToken;
|
||||
- (NSUUID *)downloadImageWithURL:(NSURL *)url
|
||||
options:(PINRemoteImageManagerDownloadOptions)options
|
||||
progressImage:(PINRemoteImageManagerImageCompletion)progressImage
|
||||
downloadProgress:(PINRemoteImageManagerDownloadProgress)downloadProgress
|
||||
progressDownload:(PINRemoteImageManagerDownloadProgress)progressDownload
|
||||
completion:(PINRemoteImageManagerImageCompletion)completion
|
||||
{
|
||||
return [self downloadImageWithURL:url
|
||||
@@ -415,7 +415,7 @@ static dispatch_once_t sharedDispatchToken;
|
||||
processorKey:nil
|
||||
processor:nil
|
||||
progressImage:progressImage
|
||||
downloadProgress:downloadProgress
|
||||
progressDownload:progressDownload
|
||||
completion:completion
|
||||
inputUUID:nil];
|
||||
}
|
||||
@@ -432,7 +432,7 @@ static dispatch_once_t sharedDispatchToken;
|
||||
processorKey:processorKey
|
||||
processor:processor
|
||||
progressImage:nil
|
||||
downloadProgress:nil
|
||||
progressDownload:nil
|
||||
completion:completion
|
||||
inputUUID:nil];
|
||||
}
|
||||
@@ -441,7 +441,7 @@ static dispatch_once_t sharedDispatchToken;
|
||||
options:(PINRemoteImageManagerDownloadOptions)options
|
||||
processorKey:(NSString *)processorKey
|
||||
processor:(PINRemoteImageManagerImageProcessor)processor
|
||||
downloadProgress:(PINRemoteImageManagerDownloadProgress)downloadProgress
|
||||
progressDownload:(PINRemoteImageManagerDownloadProgress)progressDownload
|
||||
completion:(PINRemoteImageManagerImageCompletion)completion
|
||||
{
|
||||
return [self downloadImageWithURL:url
|
||||
@@ -450,7 +450,7 @@ static dispatch_once_t sharedDispatchToken;
|
||||
processorKey:processorKey
|
||||
processor:processor
|
||||
progressImage:nil
|
||||
downloadProgress:downloadProgress
|
||||
progressDownload:progressDownload
|
||||
completion:completion
|
||||
inputUUID:nil];
|
||||
}
|
||||
@@ -461,7 +461,7 @@ static dispatch_once_t sharedDispatchToken;
|
||||
processorKey:(NSString *)processorKey
|
||||
processor:(PINRemoteImageManagerImageProcessor)processor
|
||||
progressImage:(PINRemoteImageManagerImageCompletion)progressImage
|
||||
downloadProgress:(PINRemoteImageManagerDownloadProgress)downloadProgress
|
||||
progressDownload:(PINRemoteImageManagerDownloadProgress)progressDownload
|
||||
completion:(PINRemoteImageManagerImageCompletion)completion
|
||||
inputUUID:(NSUUID *)UUID
|
||||
{
|
||||
@@ -522,7 +522,7 @@ static dispatch_once_t sharedDispatchToken;
|
||||
taskExisted = YES;
|
||||
PINLog(@"Task exists, attaching with key: %@, URL: %@, UUID: %@, task: %@", key, url, UUID, task);
|
||||
}
|
||||
[task addCallbacksWithCompletionBlock:completion progressImageBlock:progressImage downloadProgressBlock:downloadProgress withUUID:UUID];
|
||||
[task addCallbacksWithCompletionBlock:completion progressImageBlock:progressImage progressDownloadBlock:progressDownload withUUID:UUID];
|
||||
[strongSelf.tasks setObject:task forKey:key];
|
||||
|
||||
BlockAssert(taskClass == [task class], @"Task class should be the same!");
|
||||
@@ -575,7 +575,7 @@ static dispatch_once_t sharedDispatchToken;
|
||||
processorKey:processorKey
|
||||
processor:processor
|
||||
progressImage:(PINRemoteImageManagerImageCompletion)progressImage
|
||||
downloadProgress:nil
|
||||
progressDownload:nil
|
||||
completion:completion
|
||||
inputUUID:UUID];
|
||||
}
|
||||
@@ -997,7 +997,7 @@ static dispatch_once_t sharedDispatchToken;
|
||||
processorKey:nil
|
||||
processor:nil
|
||||
progressImage:nil
|
||||
downloadProgress:nil
|
||||
progressDownload:nil
|
||||
completion:nil
|
||||
inputUUID:nil];
|
||||
}
|
||||
@@ -1309,7 +1309,7 @@ static dispatch_once_t sharedDispatchToken;
|
||||
processorKey:nil
|
||||
processor:nil
|
||||
progressImage:progressImage
|
||||
downloadProgress:nil
|
||||
progressDownload:nil
|
||||
completion:completion
|
||||
inputUUID:UUID];
|
||||
return UUID;
|
||||
@@ -1380,7 +1380,7 @@ static dispatch_once_t sharedDispatchToken;
|
||||
processorKey:nil
|
||||
processor:nil
|
||||
progressImage:progressImage
|
||||
downloadProgress:nil
|
||||
progressDownload:nil
|
||||
completion:^(PINRemoteImageManagerResult *result) {
|
||||
typeof(self) strongSelf = weakSelf;
|
||||
//clean out any lower quality images from the cache
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
- (void)addCallbacksWithCompletionBlock:(nonnull PINRemoteImageManagerImageCompletion)completionBlock
|
||||
progressImageBlock:(nullable PINRemoteImageManagerImageCompletion)progressImageBlock
|
||||
downloadProgressBlock:(nullable PINRemoteImageManagerDownloadProgress)downloadProgressBlock
|
||||
progressDownloadBlock:(nullable PINRemoteImageManagerDownloadProgress)progressDownloadBlock
|
||||
withUUID:(nonnull NSUUID *)UUID;
|
||||
- (void)removeCallbackWithUUID:(nonnull NSUUID *)UUID;
|
||||
- (void)callCompletionsWithQueue:(nonnull dispatch_queue_t)queue remove:(BOOL)remove withImage:(nullable PINImage *)image animatedImage:(nullable FLAnimatedImage *)animatedImage cached:(BOOL)cached error:(nullable NSError *)error;
|
||||
|
||||
@@ -27,13 +27,13 @@
|
||||
|
||||
- (void)addCallbacksWithCompletionBlock:(PINRemoteImageManagerImageCompletion)completionBlock
|
||||
progressImageBlock:(PINRemoteImageManagerImageCompletion)progressImageBlock
|
||||
downloadProgressBlock:(PINRemoteImageManagerDownloadProgress)downloadProgressBlock
|
||||
progressDownloadBlock:(PINRemoteImageManagerDownloadProgress)progressDownloadBlock
|
||||
withUUID:(NSUUID *)UUID
|
||||
{
|
||||
PINRemoteImageCallbacks *completion = [[PINRemoteImageCallbacks alloc] init];
|
||||
completion.completionBlock = completionBlock;
|
||||
completion.progressImageBlock = progressImageBlock;
|
||||
completion.downloadProgressBlock = downloadProgressBlock;
|
||||
completion.progressDownloadBlock = progressDownloadBlock;
|
||||
|
||||
[self.callbackBlocks setObject:completion forKey:UUID];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user