Last active
March 29, 2026 01:56
-
-
Save acoomans/e93168ac02ade7f8f7fd to your computer and use it in GitHub Desktop.
Go straight to a view controller by replacing the window's root view controller (with storyboard)
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
| UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard_iPhone" bundle:nil]; | |
| UIViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"aaa"]; | |
| [UIView transitionFromView:src.view | |
| toView:dst.view | |
| duration:0.28 | |
| options:UIViewAnimationOptionTransitionFlipFromLeft | |
| completion:^(BOOL finished) { | |
| [[UIApplication sharedApplication].delegate window].rootViewController = dst; | |
| }]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment