Brian White
Brian White

Reputation: 8726

How to manage multiple UIViewController from one Container?

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.

Upvotes: 0

Views: 206

Answers (1)

hany srour
hany srour

Reputation: 83

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];

Upvotes: 0

Related Questions