Search code examples
iosobjective-ciphoneios5

How to dismiss the PushViewController?


I have 10 viewControllers in my app. I have pushed all these viewControllers using pushViewController method of NavigationController on NEXT button clicked of each viewController.

I have used code for that as ;

[self.navigationController pushViewController:someView animated:YES];

Now i want to jump back to the rootViewController from the 10th child(viewController).

How can i do this ?

Please help me..

Thanks.


Solution

  • try to use ..

    [self.navigationController popToRootViewControllerAnimated:YES];