pushViewController 方式多次跳转 怎么返回

返回上一级页面

[self.navigationController popViewControllerAnimated:YES];

返回根页面vc

[self.navigationController popToRootViewController]

返回指定的某个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];

}

}

你可能感兴趣的:(pushViewController 方式多次跳转 怎么返回)