ios develops the navigationController pushViewController method of multiple jumps back to the top to return to a specified level of implementation

  • 2020-11-26 19:00:37
  • OfStack

Returns a specified vc with the following (located via index)


[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2] animated:YES];
 Or (by class Positioning) 
for (UIViewController *controller in self.navigationController.viewControllers) {
if ([controller isKindOfClass:[ You're going to jump to Controller class]]) {
[self.navigationController popToViewController:controller animated:YES];
}
}

Related articles: