GCD UITableView asynchronous load images, wrong cells are loaded until new image download

前端 未结 3 1029
挽巷
挽巷 2020-12-09 12:55

I have a UITableView with custom cells. I load images asynchronously using Grand Central Dispatch. Everything works fine, but when I scroll down, previously loaded images ar

3条回答
  •  醉梦人生
    2020-12-09 13:50

    Doesn't UITableViewCell define -(void) prepareForReuse for that purpose? Override it and clear your imageView in there.

提交回复
热议问题