O'Reilly logo

Mastering iOS 10 Programming by Donny Wals

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Under the hood of UITableView performance

Earlier in this chapter you briefly read about the cell reuse in UITableView. You had to assign a reuse identifier to your UITableViewCell so the UITableView knows which cell you want to use. This is done so UITableView can reuse existing cells. This means that UITableView only needs to hold the visible cells and some off-screen cells in memory instead of holding one cell for every data point, even if they're off screen. Refer to the following image for a visualization of what this looks like:

Under the hood of UITableView performance

You can see that there are only a couple more cells in memory, or rendered, than there are visible cells. The ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required