A common way to build iOS apps is by using the MVC design pattern.
MVC divides an app into three different parts:
- Model: This handles data storage and representation, and data processing tasks.
- View: This includes all the things that are on the screen that the user can interact with.
- Controller: This manages the flow of information between model and view.
One feature of MVC is that view and model do not interact with one another; instead, all communication is managed by the controller.
For example, imagine you're at a restaurant. You look at a menu and choose something you want. Then, a waiter comes, takes your order, and sends it to the cook. The cook prepares your order, and, when it is done, the waiter takes the order and brings it out to you. In this scenario, the menu is the view, the waiter is the controller, and the cook is the...