Updating the data source methods in ExploreViewController

The data source methods in ExploreViewController are currently set to display 20 cells with an empty image view and label. You'll need to update them so that they can get the number of cells to display and the data to put in each cell from ExploreDataManager. Click ExploreViewController.swift and find the viewDidLoad() method. It should look like this:

override func viewDidLoad() {    super.viewDidLoad()     let manager = ExploreDataManager()    manager.fetch()}

This means the ExploreDataManager instance is only accessible within viewDidLoad(). You need to make it available to the entire class.

Move the let manager = ExploreDataManager() line to just below the collectionView property declaration. ...

Get iOS 13 Programming for Beginners - Fourth 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.