I have a class called BaseViewController that inherits from UIViewController and a class called BaseTableViewController that inherits from UITableViewController. Both of these classes have identical shared logic (i.e. rotation handling, helper methods, etc.). Right now the code is simply duplicated in both. I’ve considered just making a ViewControllerHelper class and exposing it as a public property, but I was wondering if there were any more elegant solutions.
I have a class called BaseViewController that inherits from UIViewController and a class called
Share
if you don’t need any shared ivars/properties, you could write an extension for UIViewController