I have a generic view controller in my Storyboard, let's say it's class set to MyController
class. I also have a view controller class (MySubControllerA
) which inherits from MyController
:
@interface MySubControllerA <MyController>
...
@end
The descendant class is used to overwrite some functions in the parent class.
I can instantiate the main class with this:
[[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"MyController"];
But of course this will be instantiated in the class which is given in the Storyboard for the "MyController" identifier.
I want to have an instance of MySubControllerA
which accesses everything which was set in the Storyboard and still has it's own functions. Is this possible somehow? Maybe it is not the proper way to solve this problem. Is there a better way to do this? I really don't want to mess MyController
with the specific code which I belongs to MySubControllerA
.