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

2020-02-25  本文已影响0人  iOS乐乐

①第一种跳转

    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];
上一篇 下一篇

猜你喜欢

热点阅读