summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/ios/qiosinputcontext.mm
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2014-12-02 15:33:55 +0100
committerRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2014-12-11 15:20:08 +0100
commitfb9eca8c9c7c88673cc991f978a264a493652796 (patch)
treeb33f966a732d5bbb782923c45e36b257a19fbdd4 /src/plugins/platforms/ios/qiosinputcontext.mm
parentde04841e19feb1ce1ba010c5026c06978ee03433 (diff)
iOS: let keyboard gesture work better with other gestures
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ø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosinputcontext.mm')
-rw-r--r--src/plugins/platforms/ios/qiosinputcontext.mm12
1 files changed, 12 insertions, 0 deletions
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];