Popping in a Navigation Controller
suggest changeTo previous view controller
To pop back to the previous page you can do this:
Swift
navigationController?.popViewControllerAnimated(true)
Objective-C
[self.navigationController popViewControllerAnimated:YES];
To root view controller
To pop to the root of the navigation stack, you can do this:
Swift
navigationController?.popToRootViewControllerAnimated(true)
Objective C
[self.navigationController popToRootViewControllerAnimated:YES];
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents