Can you associate child view controllers to a custom container view controller in Storyboard?
I can link child view controllers to a tab view controller, and I can link one view controller to a navigation controller.
What must I do to the container VC to accept child VCs?
As something of a combo of Caleb and Matt's answers, I did:
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"cpdc_check_embed"]) {
self.checkVC = segue.destinationViewController;
}
}
...where checkVC
is a property on the container controller:
@property (weak,nonatomic) PXPCheckViewController * checkVC;
You just have to set your embed
segue's Storyboard ID
to whatever you want (in this case, cpdc_check_embed
):
...and then check the identifier in -prepareForSegue:sender:
.
Still not an outlet, but cleaner than Matt's (IMHO) and more specific than Caleb's, and you still get a nice-looking storyboard: