实现push下一页+pop当前页的效果
NSArray *vcs = self.navigationController.viewControllers;
NSMutableArray *newVCS = [NSMutableArray array];
if ([vcs count] > 0) {
for (int i=0; i < [vcs count]-1; i++) {
[newVCS addObject:[vcs objectAtIndex:i]];
}
}
[newVCS addObject:vc];
[self.navigationController setViewControllers:newVCS animated:NO];
网友评论