UINavigationController 返回任意目录

UINavigationController 返回任意目录

返回上一级
[self.navigationController popViewControllerAnimated:YES];

返回第一级
popToRootViewControllerAnimated:YES

返回到中间任意一级

[self.navigationController popToViewController: [self.navigationController.viewControllers objectAtIndex: ([self.navigationController.viewControllers count] -2)] animated:YES];  

你可能感兴趣的:(controller)