0

I'm switching view controllers and I want to be able to change the transition when it switches. Currently, it is the default transition, which is cover vertical, and I would like it to be cross dissolve.

Here is the code for switching view controllers:

SecondViewController *secondViewController =
    [self.storyboard instantiateViewControllerWithIdentifier:@"secondViewController"];
    [self presentModalViewController:secondViewController animated:YES];
comrod
  • 343
  • 7
  • 17
  • I'd take a look at this: http://stackoverflow.com/questions/1406037/custom-animation-for-pushing-a-uiviewcontroller – Katamaritaco Jul 26 '13 at 16:29

1 Answers1

0

You can set the modalTransitionStyle

secondViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;

If that doesn't work, try

self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
Jesse Black
  • 7,966
  • 3
  • 34
  • 45