iOS PresentViewControlle后,直接返回根视图


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

例如:

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

 

 

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

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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM