Understanding model objects
As you learned in Chapter 14, Getting Started with MVC and Collection Views, a common design pattern for iOS apps is Model-View-Controller, or MVC. To recap, MVC divides an app into three different parts:
- Model: This handles data storage, representation, and data processing tasks.
- View: This is anything that is on the screen that the user can interact with.
- Controller: This manages the flow of information between model and view.
Let’s revisit the design of the Explore screen that you saw during the app tour, which looks like this:
Figure 15.1: iOS Simulator showing the Explore screen from the app tour
Build and run your app, and the Explore screen will look like this:
Figure 15.2: iOS Simulator showing the Explore screen from your app
As you can see, all of the cells are currently empty. Based on the MVC design pattern, you have completed the implementation of the views (collection view section...