WWDC 2016 Spotlight: iOS 10 UICollectionView and UITableView

Michael Gachet
BPXL Craft
Published in
2 min readJul 5, 2016

--

UICollectionView and UITableView are staples of iOS applications. Each year Apple improves those APIs, and this year the updates announced at WWDC focus heavily on scrolling performance.

Since its inception, UITableView has used a pool of reusable cells, which was limited to the maximum number of cells visible on screen at any time. The table view data source would ask an application for a cell at a specific index path and a cell would be taken from that pool, configured, and returned to the table view. The just-in-time approach to cell dequeuing and configuration may have been fine at a time of static frame computations using springs and struts. With the advent of Auto Layout, UIStackView, and automatic sizing of cells, the amount of computing required to configure cells has increased significantly. This made it very easy to run into situations where scrolling would be jerky even on the most powerful iOS device.

Starting with iOS 10, the pool of available cells has increased. With the increase, more cells will be configured ahead of time when scrolling occurs, which will likely translate into much smoother scrolling. The size of the pool is not yet known. It’s probably regarded by Apple as an implementation detail and is likely to adapt to the current device capabilities.

The great news for developers is this will require no change at all in existing code, just a recompiling of the source with the iOS 10 SDK. For users, the experience will be that much smoother.

One last thing for the road: Our dear UIRefreshControl is now available for UICollectionView … at last!

For more information on UICollectionView and UITableView, check out these resources:

For more insights on design and development, subscribe to BPXL Craft and follow Black Pixel on Twitter.

--

--

Michael Gachet
BPXL Craft

Curious mind, iOS developer, runner. All views are mine...