I've read through both the iOS View Controller Programming Guide and iOS View Programming Guide and can't work out the best way to do the following without a lot of replication in my code or storyboard.
I'm working on a simple maths tutorial program for my children which has a View with a "NumberPad", digits 0-9, in it along with an SKScene for some animation.
So far I have one viewcontroller that handles the presentation of simple add, subtract, mulitply and divide problems which is working well.
I'd like to use the same number pad for a viewcontroller that will handle long divison and multi-digit multiplication and that's where I run into trouble trying work out how to reuse the NumberPad/SKScene view.
I'm pretty sure I can work out how to create this programatically from any number of examples on how to programatically switch from one View Controller to another. But I'd much rather use interface builder to achieve this given the ease with which I can layout the controls.
Have you ever considered ContainerView? ContainerView is suitable to create common view for different viewcontrollers in your project. ContainerView is very powerful if you know how to use it. I have been using quite a lot in my project once I know how to use it.
Yesterday, there was an almost similar question about "common UITableView for all view controllers?", you may see my answer there:-
How to create common UITableView for all view controllers?
This link might help too: How to use a 'Container View' in iOS?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With