So to recap, there seems to be no way outside storing the fact that the push was performed as a state. From the answers provided below, this state can be set by implementing the UINavigationControllerDelegate
and using the navigationController:willShowViewController:animated:
method:
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
self.disappearedDueToPush = !(viewController == self);
}
If implementing the delegate seems a bit heavy handed (it did to me) you might up the following in your viewDidDisappear method instead:
if (self != [self.navigationController.viewControllers lastObject]){
self.disappearedDueToPush = YES;
}
This made more sense to me as the reverse logic (and checking towards the fact) is performed in the viewWillAppear method.