首页 > 代码库 > iOS popToViewController具体用法

iOS popToViewController具体用法

 [self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:1] 

animated:YES];

    searchBarViewController *searchBarVC = [[searchBarViewController alloc]init];

  for (UIViewController *temp in self.navigationController.viewControllers) 

{

        if ([temp isKindOfClass:[searchBarVC class]]) 

{

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

  }

}