NSURL *url = [NSURL URLWithString:head];
NSLog(@"%@", url);
[cell.image sd_setImageWithURL:url placeholderImage:nil];
使用浏览器加载url图片与用sd_setImageWithURL加载出来的图片不同, 是为什么啊?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
确认一下你的
head
里没有中文以及其他 url 非法字符吧。如果有的话,需要先 encode。并且,SDWebImage 是有缓存的。可以把 app 删掉重新装,看看是不是缓存的问题。
这一句代码看不出来为什么
访问浏览器的url 和 上面的url 相同么? cell有重用么?
是因为SDWebImage 的缓存的问题 因为图片的url没有变所以影响了SDWebImage的使用,
这样写就好了