-
-
Save bleeckerj/e68a893a6dbf0b02d18de2bd0f12ce84 to your computer and use it in GitHub Desktop.
Transition to view controller within container view (called in performForSegue:)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (void)switchToViewController:(UIViewController *)viewController | |
| { | |
| UIViewController *currentViewController = self.childViewControllers[0]; | |
| [self addChildViewController:viewController]; | |
| [self transitionFromViewController:currentViewController toViewController:viewController duration:0.2 options:UIViewAnimationOptionTransitionCrossDissolve animations:^{} | |
| completion:^(BOOL finished) { | |
| [currentViewController removeFromParentViewController]; | |
| [self.containerView addSubview:viewController.view]; | |
| }]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment