漕河泾卷王
漕河泾卷王
options使用SDWebImageProgressiveLoad时,图片很大几率会加载失败。SDWebImageRetryFailed则不会有问题。 SDWebImage的版本是5.13.0,错误信息如下: Error Domain=SDWebImageErrorDomain Code=1001 "Downloaded image decode failed" UserInfo={NSLocalizedDescription=Downloaded image decode failed} 图片是经过后端处理过,转成webp格式的。
UIImageView *image = [UIImageView new]; attachment = [NSMutableAttributedString yy_attachmentStringWithContent:image contentMode:UIViewContentModeCenter attachmentSize:image.size alignToFont:font alignment:YYTextVerticalAlignmentCenter]; [text appendAttributedString: attachment]; yy_attachmentStringWithContent当我为Content设置一个image view时,会报内存泄露。  为什么要设置UIImageView而不是image,因为我需要先显示占位图在富文本中,然后异步加载图片,加载成功后再更新UIImageView的image。 但是这个内存泄露不知道要怎么解决,weak UIImageView和页面消失的时候移除UIImageView都没有用。