HYDownloadManager 1.0.5

HYDownloadManager 1.0.5

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布最后发布2021年1月

wuhui519 维护。



 
依赖
EGOCache~> 2.0
AFNetworking~> 4.0
 

  • wuhui519

HYDownloadManager

一个工具,用于文件下载,具有内存缓存、临时缓存和永久存储。

如何使用

  • 并行下载:HYDownloadManager
//Start the download request for a URL, note that the same URL will never be downloaded twice
+ (void) downloadItemWithURL:(NSURL*)url
                    useCache:(BOOL)useCache;
//Delegate based events
// 1 url download operation can have multiple listeners
// But 1 listener cannot listen to 1 url download operation
+ (void) attachListener:(id<HYDownloadManagerDelegate>)listener toURL:(NSURL*)url;
  • 顺序下载:HYSequentialDownloadHandler
+ (HYSequentialDownloadHandler*) downloadingHandlerWithURLs:(NSArray*)urls
                                              progressBlock:(HYSequentialProgressBlock)progressBlock
                                            completionBlock:(HYSequentialCompletionBlock)completionBlock
                                                        tag:(NSInteger)tag;