iphone - navigation controller - move to first view from last view without traversing all intermediate views
i'm working on iphone app which will show 4 buttons in first view. on click of a button, it will load a new view with navigation controller. this navigation controller view allows to travel upto 11 sub views. in 11th sub view, i've a reset button. on click of reset button, i've to go back to navigation controllers first view wi开发者_C百科thout traversing all the 11 views? is it possible to achieve it? if yes how? if no, what can be the solution?
You can also use the:
[self.navigationController popToRootViewControllerAnimated:YES];
u can use [self.navigationController popToViewController:objFirstViewController animated:YES]
in the 11th view when you want to pop directly to the first view.
And if you are sure that you have to move to the first view and it is a rootviewcontroller then you can directly use
[self.navigationController popToRootViewControllerAnimated:YES];
Happy Coding..
精彩评论