How to convert this for UIViewController is it possible:
for (UIViewController *tmpController in [self.navigationController viewControllers])
{
if ([tmpController isKindOfClass:[RootViewController class]])
{
[self.navigationController popToViewController:tmpController animated:YES];
break;
}
}
[self.navigationController viewControllers] –> how to convert this for UIViewController, because I’m having error,
[self.navigationController popToViewController:tmpController animated:YES]; –> while this part i convert it to this –> [self dismissModalViewControllerAnimated:YES];
If you have ViewController A that presented ViewController B that Presented ViewController C
And you want to go back to A, do the following, in viewController C