Cell reuse and async images
You've inherited a UITableView feed where, on fast scrolling, images briefly show up in the wrong cell and then get replaced. What's the cause?
You've inherited a UITableView feed where, on fast scrolling, images briefly show up in the wrong cell and then get replaced. What's the cause?
Cells are reused, but the completion callback from the previous cell's async image request is applied to the reused cell as is. The callback captures the cell instance and runs regardless of which item the cell is showing now.
UIKitShort answerAdvanced
You need to put a horizontally scrolling UICollectionView inside a UITableViewCell in…
#tableview #collectionview #cell-reuse
UIKitShort answerAdvanced
Each cell in a UITableView flash sale list shows a countdown like "Time left 00:12:34"…
#cell-reuse #prepareforreuse
UIKitMultiple choiceAdvanced
When you add layer effects like gradients, shadows, and animations to reusable UIKit…
#cell-reuse #prepareforreuse
UIKitMultiple choiceBasics
Which statements about UITableView's dequeueReusableCell(withIdentifier:for:) and…
#tableview