You can create a new UIViewController that contains the container view in the storyboard, and assign a controller for the train network map view as a container.
Then in the code you can create an instance of the map display controller from the storyboard:
self.mapViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"MapViewController"];
Read more about the container view to understand the following lines, assuming networkMapViewController is the initial view controller that you want to flip into mapViewController:
[self.networkMapViewConroller willMoveToParentViewController:nil]; [self addChildViewController:self.mapViewController]; [self.mapViewController didMoveToParentViewController];
Then you can use the controller method viewFromViewController: toViewController: duration: options: animations: completion:
[self transitionFromViewController:self.networkMapViewController toViewController:self.mapViewController duration:.5 options:UIViewAnimationOptionCurveEaseInOut|UIViewAnimationOptionTransitionFlipFromRight animations:nil completion:^(BOOL finished) { [self.networkMapViewController removeFromParentViewController]; }];
You will need to compose similar lines to change back from the map display controller to networkMapViewController.
source share