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下载框架。最
30
30
- [x] 内置了下载速度等常见的下载信息,并且可以选择是否持久化下载任务信息
31
31
- [x] 支持后台下载
32
32
- [x] 链式语法调用
33
- - [x] 支持控制下载的最大并发数
33
+ - [x] 支持控制下载任务的最大并发数
34
34
- [x] 线程安全
35
35
36
36
## Requirements
@@ -98,7 +98,7 @@ downloadManager.download(URLString)
98
98
99
99
``` swift
100
100
downloadManager.download (URLString, fileName : " 小黄人1.mp4" , progressHandler : { (task) in
101
- let progress = task.progress .fractionCompleted
101
+ let progress = task.progress .fractionCompleted
102
102
print (" 下载中, 进度:\( progress ) " )
103
103
}, successHandler : { (task) in
104
104
print (" 下载完成" )
@@ -342,8 +342,8 @@ let task = downloadManager.fetchTask(URLString)
342
342
// 回调闭包都是在主线程运行
343
343
// progress 闭包:如果任务正在下载,就会触发
344
344
// success 闭包:有两种情况会触发:
345
- // 1. 任务已经下载过了,或者任务下载完成,这时候task.status == .failed
346
- // 2. 这时候task.status == .failed
345
+ // 1. 任务已经下载过了,或者任务下载完成,这时候task.status == .completed
346
+ // 2. 暂停下载任务, 这时候task.status == .suspend
347
347
// failure 闭包:有三种情况会触发:
348
348
// 1. 任务下载失败,这时候task.status == .failed
349
349
// 2. 取消任务,这时候task.status == .cancel
You can’t perform that action at this time.
0 commit comments