Ans : The main goal of MVC pattern is separate data/logic, view and controller. There are 3 layers.
1. Model : Models are representation of your app's data. There is user class or struct. So it has fields like name, birthdate, etc. It is data reside in Model layer.
2. View : It is object which user can see and interact with. UILabel showing text is one kind of view.
3. Controller : Controller mediates between Model and View. It takes data from model and show on views and also update model when user interacts with view.
File Structure :
Understand MVC using UITableView
1. Model : Models are representation of your app's data. There is user class or struct. So it has fields like name, birthdate, etc. It is data reside in Model layer.
2. View : It is object which user can see and interact with. UILabel showing text is one kind of view.
3. Controller : Controller mediates between Model and View. It takes data from model and show on views and also update model when user interacts with view.
File Structure :
Understand MVC using UITableView