Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tatsuro-ueda/3323781 to your computer and use it in GitHub Desktop.
Save tatsuro-ueda/3323781 to your computer and use it in GitHub Desktop.
【セグエ】セグエによる遷移のスピードを変えるには

##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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment