views:

155

answers:

1

I want to go to the very beginning of the UINavigationController after going deep several pages. If I try the following code, it will only go back one view.

[self.navigationController popViewControllerAnimated:YES];

I want to do this action on a "cancel" button placed on the top right.

+13  A: 
[self.navigationController popToRootViewControllerAnimated:YES];
Brandon Bodnár
What a thought provoking answer!!!
jjnguy
@Justin, quiet you. :)
Brandon Bodnár