Understanding collection views

In the previous chapter, you implemented the view controllers for the collection views in the Explore and Restaurant List screens without learning how they work.

To understand how collection views work, you'll implement a UIViewController subclass that controls a collection view in your CollectionViewBasics playground. You will then compare this with the implementation for the collection views in the Explore and Restaurant List screens in the next section. As there is no storyboard in the playground, you can't add UI elements as you have done in previous chapters. Instead, you will do everything programmatically.

You'll start by creating CollectionViewExampleController, an implementation of a view controller ...

Get iOS 13 Programming for Beginners - Fourth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.