IOS跳转到下一页面同时关闭当前页面
时间:2018-05-30 13:08:29
收藏:0
阅读:885
-(void)jumpVC:(UIViewController *)vc{
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:YES];
}
原文:https://www.cnblogs.com/holyday/p/9110249.html
评论(0)