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
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!