2018-06-15

2018-06-15  本文已影响0人  低调猫

项目中存在一个多条件判断跳转问题,在跳转之后页面完成操作跳回时需要跳到指定页面,可用两种方法实现,记录一下加深记忆

1.[self.navigationController popToViewController[self.navigationController.viewControllersobjectAtIndex:Index] animated:YES];

2.for (UIViewController *vc in self.navigationController.viewControllers) {

           if ([vc isKindOfClass:[你要跳转到的vc class]]) {

              [self.navigationController popToViewController:vc animated:YES];

           }

       }

上一篇 下一篇

猜你喜欢

热点阅读