Consider the following navigation hierarchy:
NavigationContrller -> ViewController1 -> ViewController2
I'd like to detect when ViewController1 is presented by going from ViewController2, i.e. by pressing the "Back" button on the NavigationController.
The method I'm interested is - (void)viewWillAppear:(BOOL)animated
. How can I check, whether the ViewController1 has been presented by going forward (i.e. NavigationController -> ViewController1) or by going backward (i.e. ViewController2 -> ViewController1)?