popToViewController的用法
第一种:
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:3]animated:YES];
第二种:
for (UIViewController *tempVC in self.navigationController.viewControllers) { if ([tempVC isKindOfClass:[目的UIViewController class]]) { [self.navigationController popToViewController:tempVC animated:YES]; } }