Collection Views Versus Tables

UICollectionView instances present an ordered collection of data items. Like table views, collections are made up of cells, headers, and footers powered by data sources and delegates. Unlike tables, collections introduce a layout—a class that specifies how items are placed onscreen. Layouts organize the location of each cell, so items appear exactly where needed.

Table 10-1 compares these two layout families. As you see, each family offers a core view class and a prebuilt controller class. These classes rely on a data source that feeds cells on demand and provides other content information. They use a delegate to respond to user interactions.

Table 10-1 Collection Views Versus Tables

There are also several fundamental ...

Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.