iOS 连续pop2个页面

//    ZYLog(@"viewControllers.count %lu",self.navigationController.viewControllers.count);
    NSInteger count = self.navigationController.viewControllers.count - 3;
    UIViewController *viewCtl = self.navigationController.viewControllers[count];

//    ZYLog(@"[viewCtl class] %@",[viewCtl class]);
    [self.navigationController popToViewController:viewCtl animated:YES];
    
    
    for(int i = 0; i < self.navigationController.viewControllers.count; i++)
    {
        ZYLog(@"%d,[vcHome class] %@",i,[self.navigationController.viewControllers[i] class]);
    }

你可能感兴趣的:(iOS 连续pop2个页面)