diff --git a/IQKeyboardManager/IQKeyboardManager.m b/IQKeyboardManager/IQKeyboardManager.m index 72325eab..f8c1df6b 100644 --- a/IQKeyboardManager/IQKeyboardManager.m +++ b/IQKeyboardManager/IQKeyboardManager.m @@ -1868,6 +1868,13 @@ -(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveT } } + // (Issue #2109) Ignore Apple Pencil touches to prevent conflicts with floating keyboard on iPad + if (@available(iOS 9.1, *)) { + if (touch.type == UITouchTypePencil) { + return NO; + } + } + return YES; } diff --git a/IQKeyboardManagerSwift/Resign/IQKeyboardResignHandler.swift b/IQKeyboardManagerSwift/Resign/IQKeyboardResignHandler.swift index 2ce06679..143026cf 100644 --- a/IQKeyboardManagerSwift/Resign/IQKeyboardResignHandler.swift +++ b/IQKeyboardManagerSwift/Resign/IQKeyboardResignHandler.swift @@ -144,6 +144,13 @@ import IQTextInputViewNotification return false } + // (Issue #2109) Ignore Apple Pencil touches to prevent conflicts with floating keyboard on iPad + if #available(iOS 9.1, *) { + if touch.type == .pencil { + return false + } + } + return true } }