How to get notified of popped view in UINavigationController?
If you have a reference to the controller down the stack, the one which will show when this one is popped, you can register as a delegate and check it through
navigationController:willShowViewController:animated:
The most popular way of handling a pop from navigation view controller (as well as from modal) is implementing viewWillDisappear
for your view controller.
- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
if (self.isMovingFromParentViewController || self.isBeingDismissed) {
// This view controller is being popped or dismissed
}
}