iOS Components and Frameworks: Understanding the Advanced Features of the iOS SDK
by Kyle Richter, Joe Keeley
Introducing Collection Views
A collection view needs a few different classes in order to work. The base class is called UICollectionView and is a subclass of UIScrollView. It will manage the presentation of cells provided by the datasource (which can be any class implementing the UICollectionViewDataSource protocol), according to the layout referenced by the collection view, which will be an instance of UICollectionViewLayout. A delegate conforming to the UICollectionViewDelegate protocol can be specified to manage selection and highlighting of cells.
The class that conforms to the UICollectionViewDataSource protocol will return configured cells to the collection view, which will be instances of UICollectionViewCell. If the collection view is ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access