ios - SDWebImage 是怎么解决图片错位的
黄舟
黄舟 2017-04-17 16:57:43
0
2
394
黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
Ty80

You can take a closer look at sd_setImageWithURL: 方法的内部实现,其实每次调用该方法都会先 Cancel 掉这个UIImageView the operations being performed by the previous request, and then start a new download, using runtime technology to access relevant data, thus avoiding the problem of Cell reuse.

大家讲道理

Recurrence should be a problem of cell reuse. When the image on a cell is not loaded and the cell happens to be reused, the image on the cell will display the previous image. The solution is to set the image to nil in the cell's prepareforreuse.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!