How can I popViewController to rootViewController?

1.1k views Asked by At

Let me specific. I have three XIBs. From the first XIB i used pushViewController and got into the second. From the button click in second XIB i got into the third. The thing is, On the click of Cancel button in third ViewController I have to go the first XIB. How is this possible? I am stuck there. Help me please. I used the navigationController to push the viewControllers. I have already used the popToRootViewController: but it popped only to the second XIB.

1

There are 1 answers

0
Splendid On

use this

[self.navigationController popToRootViewController:YES];