ios pushView多级返回问题

返回第一页

[self.navigationControllerpopToRootViewController]
返回指定的某个vc用下面(通过index定位)

[self.navigationControllerpopToViewController:[self.navigationController.viewControllersobjectAtIndex:2]animated:YES];

或(通过class定位)

for(UIViewController *controllerinself.navigationController.viewControllers) {if([controllerisKindOfClass:[你要跳转到的Controllerclass]]) {[self.navigationControllerpopToViewController:controlleranimated:YES];

}

}

你可能感兴趣的:(ios pushView多级返回问题)