In the storyboard, you can add two container views to the same view controller and connect them both with the same child view controller by right-click dragging and choosing embed. This created the segue like so:
Click on the segue and give it an identifier. Then, add the prepareForSegue
method to your parent view controller, and set some properties for the lap timers separately if you want.
- (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segueName isEqualToString: @"embedSegueToLapTimerOne"]) {
LapCounterNibViewController * childViewController = (LapCounterNibViewController *) [segue destinationViewController];
[childViewController setFoo:bar1];
}
if ([segueName isEqualToString: @"embedSegueToLapTimerTwo"]) {
LapCounterNibViewController * childViewController = (LapCounterNibViewController *) [segue destinationViewController];
[childViewController setFoo:bar2];
}
}