NSInteger popIndex = (NSInteger)[[self.navigationController viewControllers] indexOfObject:self];
if (popIndex > 2) {
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:(popIndex-2)] animated:YES];
}else{
[self.navigationController popViewControllerAnimated:YES];
}
网友评论