0

我正在切换视图控制器,我希望能够在切换时更改过渡。目前,它是默认过渡,即垂直覆盖,我希望它是交叉溶解。

下面是切换视图控制器的代码:

SecondViewController *secondViewController =
    [self.storyboard instantiateViewControllerWithIdentifier:@"secondViewController"];
    [self presentModalViewController:secondViewController animated:YES];
4

1 回答 1

0

您可以设置modalTransitionStyle

secondViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;

如果这不起作用,请尝试

self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
于 2013-07-26T16:31:37.617 回答