Model-View-Controller
Before you begin your application, let’s discuss a key concept in application architecture: Model-View-Controller, or MVC. MVC is a design pattern used in iOS development. In MVC, every instance belongs to either the model layer, the view layer, or the controller layer. (Layer here simply refers to one or more objects that together fulfill a role.)
-
The model layer holds data and knows nothing about the user interface, or UI. In Quiz, the model will consist of two ordered lists of strings: one for questions and another for answers.
Usually, instances in the model layer represent real things in the world of the user. For example, when you write an app for an insurance company, your model will almost certainly ...
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