iOS PresentViewControlle后,直接返回根视图

mac2024-11-15  59

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

例如:

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

 

 

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

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

 

最新回复(0)