thoughtbreaker
thoughtbreaker

Reputation: 161

How can I popViewController to rootViewController?

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.

Upvotes: 1

Views: 1109

Answers (1)

Splendid
Splendid

Reputation: 1061

use this

[self.navigationController popToRootViewController:YES];

Upvotes: 1

Related Questions