Summary
The MVC pattern should now hold no confusion for you. We have seen in this chapter how this design pattern is widely misunderstood on iOS, and often leads to Massive View Controller syndrome. Hopefully, you should now be able to refactor your code to improve the readability and maintainability of your view controllers, and properly isolate each layer.
We discussed how to use view controller composition with child view controllers, in order to reduce overly complex view controllers or views.
In a nutshell, you should always ensure view controllers only have view layout logic, and increase separation by focusing the responsibilities of each view controller as much as possible. Never forget you can create controllers, model controllers, ...
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