UICollectionView + SDWebImage + Cell reuse

前端 未结 5 579
再見小時候
再見小時候 2021-01-06 03:39

I have a UICollectionView with a custom UICollectionViewCell class which adds another UIView (thumbnailView) to its contentView. This other view has a UIImageView property (

5条回答
  •  [愿得一人]
    2021-01-06 04:28

    I tried both didEndDisplayCell() and prepareForReuse(), neither of them work. A work round way is to set imageView.image as nil then assign to the specific image, then it will not blink the old image as background. (but it will be slower since it has to do the "clean" job first).

提交回复
热议问题