From ca6cc2eb735c9526e84d7c97a0a8b774d3ea85d7 Mon Sep 17 00:00:00 2001 From: GabrieleBenvenuti Date: Thu, 15 Jun 2017 11:33:01 +0200 Subject: [PATCH] Fixed ScrollView problem on iOS Also with the latest update, if the SignaturePad is inside a ScrollView on iOS, the touch event were passed to the ScrollView and was impossible to use the signature component. --- src/SignaturePad.iOS/InkPresenter.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/SignaturePad.iOS/InkPresenter.cs b/src/SignaturePad.iOS/InkPresenter.cs index a50102d..167d409 100644 --- a/src/SignaturePad.iOS/InkPresenter.cs +++ b/src/SignaturePad.iOS/InkPresenter.cs @@ -28,6 +28,10 @@ private void Initialize () { Opaque = false; } + + // If you put SignaturePad inside a ScrollView, this line of code prevent that the gesture inside + // an InkPresenter are dispatched to the ScrollView below + public override bool GestureRecognizerShouldBegin(UIGestureRecognizer gestureRecognizer) => false; public override void TouchesBegan (NSSet touches, UIEvent evt) {