Skip to content

Instantly share code, notes, and snippets.

@cellularmitosis

cellularmitosis/README.md

Last active Jul 12, 2020
Embed
What would you like to do?
Populating UITableViewCells Asynchronously to Maintain Scrolling Performance

Blog 2015/9/25   (retroactively blogged on 2020/6/11)

<- previous | index | next ->

Populating UITableViewCells Asynchronously to Maintain Scrolling Performance

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.

See https://github.com/pepaslabs/GlitchyTable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.