How to perform segue with no transition animation

ios, ipad, iphone, storyboard

Solution

Duplicate your segue in Storyboard and give the second one a different ID.

You can then change the transition in the new version.

Problem

I have an application which starts with a navigation controller. This navigation controller can open modal view controller: ``` - (void)openModalController:(id)sender { [self performSegueWithIdentifier:@"SegueIdentifier"]; } ``` But when the user opens an application using url scheme, I'd like to present the application with the modal controller opened. So I added some methods and tried: ``` // Controller - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; // animated == NO in initial loading if (_shouldOpenModalController) { [self openModalController:nil]; } } - (void)setShouldOpenModalController:(BOOL)flag { _shouldOpenModalController = flag; } // AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { if (launchOptions) { UINavigationController *nc = (UINavigationController *)self.window.rootViewController; MyViewController *c = (MyViewController *)[ns topViewController]; [c setShouldOpenModalController]; } } ``` But here is a problem: the `openModalController:` performs segue with transition animation I setup in storyboard. How can it be done with no animation? Is there another approach for this task?

Original source