My app supports two groups of viewControllers, those that are supposed to work in portrait and those who are supposed to work in landscape.
Presenting viewControllers of different orientations from each other results in wrong orientations, so someone suggested me to create a viewController containment master viewController (making that shoulAutorotate YES to all orientations) and add two branches of viewControllers from that, one for portrait (with shouldAutorotate YES for portrait) and one for landscape (with shouldAutorotate YES for landscape). My question is: will this work? I mean, will each viewController on each branch rotate to the correct orientation?
Another question is this: my project is based on the single view Xcode template. That template creates a RootViewController as the one that shows when the app starts. My problem is this: to make the containment suggestion works I have to transform this rootViewController in the container viewController and I have to move all the code it has to another view controller and present that when the app starts. I mean this:
WHAT I HAVE TODAY
- the app runs and shows the rootViewController. Lets call this vCA.
If I chabge the rootViewController to be the container viewController I will have this
- the app runs and shows the containerController that is completely empty and has to present the old vCA.
It appears to me a dumb solution, I mean, present the containerController that is empty and will call vCA?
How do I do that?
thanks.