美文网首页
页面push,pop跳转自己想要去的页面

页面push,pop跳转自己想要去的页面

作者: iOS乐乐 | 来源:发表于2020-02-25 08:42 被阅读0次

①第一种跳转

    ApplyProcessViewController *VC = [[ApplyProcessViewController alloc] init];
    VC.hidesBottomBarWhenPushed = YES;
    VC.idStr=@"";
    NSMutableArray *arrView = [NSMutableArray arrayWithArray:self.navigationController.viewControllers];
    NSMutableArray*newArr=[NSMutableArray arrayWithObjects:[arrView firstObject],arrView[1], nil];
    [newArr addObject:VC];
    [self.navigationController setViewControllers:newArr animated:YES];

②第二种跳转

     RealNameFatherViewController *investmentList = [[RealNameFatherViewController alloc] init];
     investmentList.hidesBottomBarWhenPushed = YES;
      NSMutableArray *arrView = [NSMutableArray arrayWithArray:self.navigationController.viewControllers];
     int index = (int)[arrView indexOfObject:self];
     [arrView removeObjectAtIndex:index];
     [arrView addObject:investmentList];
     [self.navigationController setViewControllers:arrView animated:YES];

相关文章

网友评论

      本文标题:页面push,pop跳转自己想要去的页面

      本文链接:https://www.haomeiwen.com/subject/unczqhtx.html