What methods are called when returning to a previous view, or the root view, of a UINavigationController?
Also, when the user taps the back button to return to the previous view, is everything in the view that’s disappearing released, and its values unretrievable from the parent view?
viewWillDisappear:animated:will be called on a view controller before it is popped from the navigation stack.This is the place to do anything that you need to do when the user goes “back” in the navigation controller. You can access any other controllers in the navigation stack via
self.navigationController.viewControllerswhich is an array of all the view controllers currently in the stack, with the root view controller at index 0.