UINavigationController先pop再push,push操作将无效。
解决方案是:
OrderDetailViewController *vc = [[OrderDetailViewController alloc] init];
NSMutableArray *arrView = [NSMutableArray arrayWithArray:self.navigationController.viewControllers];
int index = (int)[arrView indexOfObject:self];
[arrView removeObjectAtIndex:index];
[arrView addObject:vc];
[self.navigationController setViewControllers:arrView animated:NO];
网友评论