Tag: nsprogress

为多个文件下载添加子进度

我在我的项目中使用AFNetworking 3.0下载多个文件。 我想显示所有文件的单一下载进度。 我将每个文件下载的每个subprocess添加到父进程。 但它不工作,应用程序崩溃。 我收到错误 – Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '<DownloadManager: 0x7f92e2f6e130>: An -observeValueForKeyPath:ofObject:change:context: message was received but not handled. Key path: fractionCompleted 这是我的下载类 – @interface DownloadManager () @property (nonatomic, strong) NSProgress *progress; @property (nonatomic, strong) Settings *settings; @property (nonatomic, strong) DocumentDirectory *documentDirectory; @end @implementation DownloadManager – (instancetype)init { self […]