UIViewController
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...