How to manage multiple UIViewController from one Container?

216 Views Asked by At

I have a UIViewController inside which I have a Container. I want to be able to change the UIViewController inside that Container. I think I can manage the Segue calls to make that happen but how do I connect multiple UIViewController objects (and their related Segues) on a Storyboard with UIBUilder?

enter image description here

Here you can see my basic layout and that I've attached one UIViewController to the Container. Now I want to attach the second to it on the Storyboard in the same way and manage both in code.

1

There are 1 best solutions below

1
On
RowViewController *infoController = [self.storyboard instantiateViewControllerWithIdentifier:@"RowViewController"];
[self addChildViewController:infoController];
infoController.view.frame = CGRectMake(0, 86, 745, 682);
[self.view addSubview:infoController.view];
[infoController didMoveToParentViewController:self];