Displaying data in a collection view
You've implemented a data manager class, ExploreDataManager
, which reads cuisine data from the ExploreData.plist
file and stores it in an array of ExploreItem
instances. Now, you will modify the ExploreViewController
class to use that array as the data source for the collection view on the Explore screen.
At present, the collection view on the Explore screen displays 20 collection view cells, with each cell containing an empty image view and a label. You need a way to set the values for the image view and the label in the cells, so you will create a view controller, ExploreCell
, for this purpose. You can then configure the view controller for the collection view, ExploreViewController
, to get cuisine details from the ExploreDataManager
instance and provide it to the collection view for display. To create ExploreCell
, follow these steps:
- Right-click on the Explore folder in the Project navigator and choose New Group.
- Rename the...