Blog 2015/9/25 (retroactively blogged on 2020/6/11)
<- previous | index | next ->
In general, the key to keeping the iPhone UI responsive is to avoid blocking the main thread.
In the case of UITableView
, this boils down to keeping tableView(_:cellForRowAtIndexPath:)
as performant as possible.
However, sometimes it is simply not possible to marshall all of the data needed to populate a
complex UITableViewCell
without causing a drop in framerate.
In these cases, it is necessary to switch to an asynchronous strategy for populating UITableViewCells
.
In this article we explore a trivial example of using this technique.