Это pod 'SDWebImage' = '4.0.0'
и XCode == 11.3.1
self.userAvatar.sd_setImage(with: URL(string: __user_avatar), placeholderImage: UIImage(named: "UserDefalutAvatar"), options: .progressiveDownload, progress: { (receivedSize, expectedSize, targetURL) in
print("The progress value for the downloading is \(receivedSize)")
}) { (downloadedImage, downloadedError, imageCacheType, downloadedURL) in
if let _downloadedError = downloadedError {
print("Download image encountered error. \(_downloadedError.localizedDescription)")
return
}
if let _downloadedImage = downloadedImage {
print("This is downloaded image, you can do it what you want")
}
}