Skip to content

Instantly share code, notes, and snippets.

@acoomans
Last active March 29, 2026 01:56
Show Gist options
  • Select an option

  • Save acoomans/e93168ac02ade7f8f7fd to your computer and use it in GitHub Desktop.

Select an option

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)
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