我需要下载大尺寸的图像。即使我的应用程序进入后台,下载也需要继续。我正在使用SD-Web图像框架处理图像下载。它工作正常,但是当应用程序从后台运行到前台时,图像下载将终止。
这是我的代码:
let completionblock : SDExternalCompletionBlock = { image, error, cacheType,
imageURL in
activityIndicator.stopAnimating()
activityIndicator.removeFromSuperview()
}
imageThumbnail.sd_setImage(with: imagUrl, completed: completionblock)`
答案 0 :(得分:0)
下载完成后,UIImageView将调用mainThread。 视图更新了mainThread上的需求。因此,您需要更新线程。
find . -name "enum.py"
主要