ios 中pop跳转,不用再生成一个controller

pop跳转:

[self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:2
animated:YES];


for (UIViewController *temp in self.navigationController.viewControllers) {
           if ([temp isKindOfClass:[你要跳转到的Controller class]]) {
              [self.navigationController popToViewController:temp animated:YES];
           }
       }

猜你喜欢

转载自blueskator.iteye.com/blog/2169541