I know this is a pretty old question, so the answer may not be useful for the OP, but maybe for someone else. Yesterday I ran into the same problem and searched many times for SO, the rest of the network, finding nothing. So, here is the solution I used for a similar problem. This is implemented as a delegate to the navigation manager, but I think you can do it elsewhere if that is better.
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { id<UIViewControllerTransitionCoordinator> tc = navigationController.topViewController.transitionCoordinator; [tc notifyWhenInteractionEndsUsingBlock:^(id<UIViewControllerTransitionCoordinatorContext> context) { NSLog(@"DONE!!!"); NSLog(@"Container View: %@", [context containerView]); NSLog(@"From VC: %@", [context viewControllerForKey:UITransitionContextFromViewControllerKey]); NSLog(@"To VC: %@", [context viewControllerForKey:UITransitionContextToViewControllerKey]); NSLog(@"Initially Interactive: %i", [context initiallyInteractive]); NSLog(@"Completion Curve: %d", [context completionCurve]); NSLog(@"Is Animated: %i", [context isAnimated]); NSLog(@"Is Cancelled: %i", [context isCancelled]); NSLog(@"Is Interactive: %i", [context isInteractive]); NSLog(@"Percent Complete: %f", [context percentComplete]); NSLog(@"Presentation Style: %d", [context presentationStyle]); NSLog(@"Transition Duration: %f", [context transitionDuration]); }]; }
This works when the user lifts his finger and the animation is canceled or completed. [context isCancelled]; will inform you whether it will be canceled or supplemented. In addition, there is a lot of other nice information in the context object that you can use.
source share