Personally, when I need logical logic, I do this with a subclass of UIViewController . Also, if I'm looking for some of the behavior that you get from a UIViewController , for example. presenting it in models or in the navigation controller.
If you are doing something fairly simple or easy, a UIView subclass is usually sufficient. I seem to have used them most often when creating custom buttons and table cells.
In my experience, I have found that I use additional subclasses of UIViewController than subclasses of UIView , but this may not be the best, it happens that I feel a little more comfortable using view dispatchers rather than direct views.
Simon goldeen
source share