Per-cell countdown with reuse
Each cell in a UITableView flash sale list shows a countdown like "Time left 00:12:34" that ticks down every second. Instead of one Timer per cell, how would you design it?
Each cell in a UITableView flash sale list shows a countdown like "Time left 00:12:34" that ticks down every second. Instead of one Timer per cell, how would you design it?
Keep one timer per screen (RunLoop .common mode) and update only the visible cells every second. Cells hold no state; they display the difference between the model's end time and now.
UIKitMultiple choiceAdvanced
When you add layer effects like gradients, shadows, and animations to reusable UIKit…
#cell-reuse #prepareforreuse #objective-c
UIKitShort answerBasics
You've inherited a UITableView feed where, on fast scrolling, images briefly show up in…
#cell-reuse #prepareforreuse
UIKitShort answerBasics
Why did Apple design UITableView with two protocols, dataSource and delegate, instead of…
#uitableview #objective-c
UIKitMultiple choiceBasics
In a UITableView that doesn't use estimatedRowHeight, what's the correct order these four…
#uitableview #objective-c