O'Reilly logo

Mastering iOS 11 Programming - Second Edition 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 a few offscreen cells in memory instead of all of the cells you might want to show, even if the cell is off screen. Refer to the following figure for a visualization of what this looks like:

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

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