UINavigationController如何连续返回两级/回到第一级

NSUInteger index=[[self.navigationController viewControllers]indexOfObject:self];
[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:index-2]animated:YES];

你可能感兴趣的:(UINavigationController如何连续返回两级/回到第一级)