关于多层模态跳转后一步返回底层

我们用到模态跳转的时候,如果连续多层的跳转,再次返回的时候,比如从A 跳转的B 再从B跳转到C, 经过的三层的跳转,如果我们现在想从C 一步直接的返回到A ,如果我们用代理 和dismissViewControllerAnimated:YES completion:nil 结合用 效果不是太好 ,用下面的额两句代码 就能产生比较好的跳转效果:

self.presentingViewController.view.alpha = 0;
 [self.presentingViewController.presentingViewController dismissViewControllerAnimated:YES completion:nil];

猜你喜欢

转载自blog.csdn.net/qq_30963589/article/details/52438433