Reputation: 99
I am working with a navigation controller segue which contains around 5 ViewController. Each ViewController is preceded for another one like an installation app. The last ViewController contains a button which makes you go back to the first ViewController through this sentence:
[self.navigationController popToRootViewControllerAnimated:YES];
My questions is, how can I release all the objects, ViewController, memory which I have been storing during the first execution of the application, and when I click the button to go back to the first ViewController, get the environment as a first execution.
Any ideas? Thanks!
Upvotes: 0
Views: 853
Reputation: 1528
This method pops all the view controllers on the stack except the root view controller.
Upvotes: 1