I want to make a ViewController base-class which I can reuse throughout the project.
I want to create a pop-up ViewController which I can adjust with multiple sub-classes which all share the same basic layout (inherited from the base-class). I would like the layout of the base class to be defined in a storyboard scene in an attempt to follow apple's guidelines (not using xib's). This also includes setting up all constraints in interface builder, and not in code.
All I want to do is the right thing :)
My problem is that if I start to subclass my ParentViewController (which has an associated scene in a Storyboard), the app won't let me show the ViewController. If I instantiate through the Storyboard ID, I can't cast it to my subclass. If I instantiate by creating an instance of the subclass-ViewController, it won't show, as the UI in the storyboard file is "locked" to the ParentViewController.
How do I make a base-ViewController with an associated scene in a storyboard file, which I can use various sub-classes (or the like). To be concrete: I want to make a pop-up, which can vary slightly depending on the usage. I don't want to make init-methods for each variation, as that would defeat the purpose of attempting to split code.
Thanks for any help or comment!