File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ Tiercel是一个非常简单易用且功能丰富的纯Swift下载框架。最
3030- [x] 内置了下载速度等常见的下载信息,并且可以选择是否持久化下载任务信息
3131- [x] 支持后台下载
3232- [x] 链式语法调用
33- - [x] 支持控制下载的最大并发数
33+ - [x] 支持控制下载任务的最大并发数
3434- [x] 线程安全
3535
3636## Requirements
@@ -98,7 +98,7 @@ downloadManager.download(URLString)
9898
9999``` swift
100100downloadManager.download (URLString, fileName : " 小黄人1.mp4" , progressHandler : { (task) in
101- let progress = task.progress .fractionCompleted
101+ let progress = task.progress .fractionCompleted
102102 print (" 下载中, 进度:\( progress ) " )
103103}, successHandler : { (task) in
104104 print (" 下载完成" )
@@ -342,8 +342,8 @@ let task = downloadManager.fetchTask(URLString)
342342// 回调闭包都是在主线程运行
343343// progress 闭包:如果任务正在下载,就会触发
344344// success 闭包:有两种情况会触发:
345- // 1. 任务已经下载过了,或者任务下载完成,这时候task.status == .failed
346- // 2. 这时候task.status == .failed
345+ // 1. 任务已经下载过了,或者任务下载完成,这时候task.status == .completed
346+ // 2. 暂停下载任务, 这时候task.status == .suspend
347347// failure 闭包:有三种情况会触发:
348348// 1. 任务下载失败,这时候task.status == .failed
349349// 2. 取消任务,这时候task.status == .cancel
You can’t perform that action at this time.
0 commit comments