I have 3 viewControllers that appear in sequence, A -> B -> C
A calls B using
[self.navigationController pushViewController:controllerB animated:YES];
C calls B by
[self.navigationController popViewControllerAnimated:YES];
is there a way for B to know who called it, A or C?
thanks.
You can use the NavigationControllers viewControllers property. To see which items are in the navigation stack.
You want the view controller at index n-2.
http://developer.apple.com/library/ios/#documentation/uikit/reference/UINavigationController_Class/Reference/Reference.html
Edit (Added Example)