返回指定的某个vc用下面(通过index定位) [self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2] animated:YES];或(通过class定位)for (UIViewController *controller in
返回指定的某个vc用下面(通过index定位)
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2] animated:YES]; 或(通过class定位) for (UIViewController *controller in self.navigationController.viewControllers) { if ([controller isKindOfClass:[你要跳转到的Controller class]]) { [self.navigationController popToViewController:controller animated:YES]; } }
以上所述是小编给大家介绍的ios开发navigationController pushViewController 方式多次跳转返回到最上层返回到指定的某一层的实现方法,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对自由互联网站的支持!