Commit 39ab43e5 authored by Alex朱枝文's avatar Alex朱枝文

优化下载图片使用缓存

parent 1d886d67
......@@ -747,7 +747,7 @@ extension YHH5WebViewVC {
YHHUD.flash(message: "保存失败")
return
}
ImageDownloader.default.downloadImage(with: url, options: nil) { result in
KingfisherManager.shared.retrieveImage(with: url) { result in
switch result {
case .success(let imageLoadingResult):
self.saveImage(imageLoadingResult.image)
......
......@@ -244,7 +244,7 @@ private extension YHLongtapPictureSheetView {
YHHUD.flash(message: "保存失败")
return
}
ImageDownloader.default.downloadImage(with: url, options: nil) { result in
KingfisherManager.shared.retrieveImage(with: url) { result in
switch result {
case .success(let imageLoadingResult):
self.saveImage(imageLoadingResult.image)
......
......@@ -73,7 +73,7 @@ class YHPictureBrowserViewController: JXPhotoBrowser {
YHHUD.flash(message: "保存失败")
return
}
ImageDownloader.default.downloadImage(with: url, options: nil) { result in
KingfisherManager.shared.retrieveImage(with: url) { result in
switch result {
case .success(let imageLoadingResult):
self.saveImage(imageLoadingResult.image)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment