Having properly framed the MVC pattern in a general context, we can take a look at the specificities of UIViewController.
The best way to get a proper understanding of view controllers is to consult the official documentation at https://developer.apple.com/documentation/uikit/uiviewcontroller:
"The UIViewController class defines the shared behavior that is common to all view controllers. You rarely create instances of the UIViewController class directly. Instead, you subclass UIViewController and add the methods and properties needed to manage the view controller's view hierarchy."
From this quote, we can gather the following:
- UIViewController provides shared behaviors
- Those behaviors are intended to be used on view controllers
- You use subclassing in order to benefit from those behaviors
- You use subclassing in order to manage the view controller/views hierarchy
Something interesting about this quote; it doesn't talk about application state, networking, or persistence; the only components that are mentioned are views.
A view controller's responsibilities include the following:
- Updating the contents of the views, usually in response to changes to the underlying data
- Responding to user interactions with views
- Resizing views and managing the layout of the overall interface
- Coordinating with other objects—including other view controllers—in your app
When looking at these responsibilities, we can see that this category of objects doesn't belong to the controller layer, but to the view layer of the MVC pattern.