当前位置:首页 > 操作系统 > Ios

iOS PresentViewControlle后,直接返回根视图

在开发中:用[self presentViewController:VC animated:YES completion:nil];实现跳转,多次跳转后,直接返回第一个。

例如:

A presentViewController B
B presentViewController C
C 直接回到A:

 

技术分享

 

返回第一个视图核心代码如下:

[self.presentingViewController.presentingViewController dismissViewControllerAnimated:YES completion:nil];

 

 

 
 

原文:http://www.cnblogs.com/razaios/p/5094955.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!