From b96b30c9968651acaedb733e67e8fec7ce8e679b Mon Sep 17 00:00:00 2001 From: Evan Owen Date: Sat, 19 Apr 2014 00:18:11 -0700 Subject: [PATCH] Only intercept transitions that were initiated interactively `[UIViewControllerTransitionCoordinator initiallyInteractive]` returns true only if the transition is both animated and interactive. https://developer.apple.com/library/ios/documentation/uikit/reference/UIViewControllerTransitionCoordinatorContext_Protocol/Reference/Reference.html#//apple_ref/occ/intfm/UIViewControllerTransitionCoordinatorContext/initiallyInteractive This fixes bugs caused by non-interactive transitions, some of which aren't even panning, such as modal presentation transitions. Another way to fix modal transitions whould be to check `presentationStyle`, but from what I can tell we only need to handle interactive transitions anyway. Signed-off-by: Evan Owen --- Classes/UIViewController+TAPKeyboardPop.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/UIViewController+TAPKeyboardPop.m b/Classes/UIViewController+TAPKeyboardPop.m index a791e1e..19e6c1d 100644 --- a/Classes/UIViewController+TAPKeyboardPop.m +++ b/Classes/UIViewController+TAPKeyboardPop.m @@ -40,7 +40,9 @@ - (void)tap_beginAppearanceTransition:(BOOL)isAppearing animated:(BOOL)animated { [self tap_beginAppearanceTransition:isAppearing animated:animated]; - if (isAppearing || !animated || self.tap_previousResponder == nil) { + if (isAppearing || + self.tap_previousResponder == nil || + self.transitionCoordinator.initiallyInteractive == NO) { return; }