//定义一个数组来接收所有导航控制器里的视图控制器
NSArray *controllers = self.navigationController.viewControllers;
//根据索引号直接pop到指定视图
[self.navigationController popToViewController:[controllers objectAtIndex:1] animated:NO];
时间: 2024-10-14 13:05:06
//定义一个数组来接收所有导航控制器里的视图控制器
NSArray *controllers = self.navigationController.viewControllers;
//根据索引号直接pop到指定视图
[self.navigationController popToViewController:[controllers objectAtIndex:1] animated:NO];