一,popViewControllerAnimated
[self.navigationController popViewControllerAnimated:YES];
二,popToRootViewControllerAnimated
[self.navigationController popToRootViewControllerAnimated:YES];
三,popToViewController
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2] animated:YES];
或
//假如你要跳转到DeskViewController for (UIViewController *temp in self.navigationController.viewControllers) { if ([temp isKindOfClass:[DeskViewController class]]) { [self.navigationController popToViewController:temp animated:YES]; } }
时间: 2024-10-31 16:23:35