[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];
}
}
iOS popToViewController具体用法
时间: 2024-12-25 23:56:13