How to change speed of segue between ViewControllers

2 Solutions Collect From Internet About “How to change speed of segue between ViewControllers”

Below code is of custom segue, and you can set duration of transition in code.

- (void)perform 
{
    UIViewController *src = (UIViewController *) self.sourceViewController;
    UIViewController *dst = (UIViewController *) self.destinationViewController;
    [UIView transitionFromView:src.view
                        toView:dst.view
                      duration:3.0
                       options:UIViewAnimationOptionTransitionFlipFromLeft
                    completion:NULL];

}

Sample project is here in GitHub:https://github.com/weed/p120805_CustomSegue

You can download and just run it. I wish this is help for you.

to prevent zombies creation i think better to do use subview add/remove as well:

- (void)perform
{
    UIView *src = ((UIViewController *) self.sourceViewController).view;
    UIView *dst = ((UIViewController *) self.destinationViewController).view;

    UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
    [window insertSubview:dst aboveSubview:src];

    [UIView transitionFromView:src
                        toView:dst
                      duration:1.5
                       options:UIViewAnimationOptionTransitionCrossDissolve
                    completion:^(BOOL finished){
                        [src removeFromSuperview];
                        window.rootViewController = self.destinationViewController;
                    }];
}

this is if you are not using navigation controller!