From fb9eca8c9c7c88673cc991f978a264a493652796 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 2 Dec 2014 15:33:55 +0100 Subject: iOS: let keyboard gesture work better with other gestures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let the keyboard gesture work better alongside other gestures by reporting that it should: 1. not prevent other gestures from triggering. This means that even if our gesture triggers (we close the keyboard), gestures attached to sub-views will still continue tracking. 2. not be prevented by other gestures. This means that if a gesture in a sub-view triggeres before our gesture, our gesture will still continue to track. In short it means that regardless of other gestures, we always close the keyboard if our text responder is first responder and the user flicks down. And we do so as "silently" as possible. Change-Id: I22386b5ef5dedbc498a2899929ddd07424e514d8 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qiosinputcontext.mm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/plugins/platforms/ios/qiosinputcontext.mm') diff --git a/src/plugins/platforms/ios/qiosinputcontext.mm b/src/plugins/platforms/ios/qiosinputcontext.mm index e8b16a0ed8..76c02d939f 100644 --- a/src/plugins/platforms/ios/qiosinputcontext.mm +++ b/src/plugins/platforms/ios/qiosinputcontext.mm @@ -162,6 +162,18 @@ static QUIView *focusView() // ------------------------------------------------------------------------- +- (BOOL)canPreventGestureRecognizer:(UIGestureRecognizer *)other +{ + Q_UNUSED(other); + return NO; +} + +- (BOOL)canBePreventedByGestureRecognizer:(UIGestureRecognizer *)other +{ + Q_UNUSED(other); + return NO; +} + - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [super touchesBegan:touches withEvent:event]; -- cgit v1.2.3