swift iOS - UICollectionView images mixed up after fast scroll

前端 未结 2 1769
闹比i
闹比i 2021-01-11 18:24

I am new to swift and iOS programming, but I have been able to build a mostly stable starting interface for my application in Xcode. The CollectionView grabs an image and te

2条回答
  •  时光说笑
    2021-01-11 19:12

    Implement func prepareForReuse() in your custom cell class. And reset your image in prepareForReuse() function. so it will reset the image view before reuse the cell.

提交回复
热议问题