簡單記錄一下問題仑性,主要問題是圖片的像素太大了,我們可以手動限制下載的最大像素右蹦。
[self.imageView sd_setHighlightedImageWithURL:[NSURL URLWithString:urlStr]
options:SDWebImageRetryFailed | SDWebImageAllowInvalidSSLCertificates
context:@{SDWebImageContextImageThumbnailPixelSize : @(CGSizeMake(180, 120))}
progress:nil
completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
}];
類似上面那樣诊杆,在context中添加參數(shù) @{SDWebImageContextImageThumbnailPixelSize : @(CGSizeMake(180, 120))}
參考:
內存問題#3034