By below code I am moving to RootViewController from firstView.
RootVi开发者_StackOverflow中文版ewController *controller = [[RootViewController alloc]
initWithNibName:@"RootView" bundle:nil];
[self.navigationController popToRootViewControllerAnimated:YES];
[controller release];
Now, how can I move to RootViewController from the last View using push, but not with pop????? We have to change pop to push? Can anyone help in suggesting the code for this ?????
popToRootViewControllerAnimated
will pop to the beginning of the stack.
myRoot -> firstView -> secondView -> thirdView
If you were to use popToRootViewControllerAnimated
in thirdView
, it will pop to myRoot
.
精彩评论