From a1b7ca33c8f1b1a0aaa5abcdbdf4cc5fed6442a1 Mon Sep 17 00:00:00 2001 From: Wonday Date: Wed, 22 Nov 2017 23:37:28 +0800 Subject: [PATCH] set subview does not receive touch --- ios/RCTPdf/RCTPdfView.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ios/RCTPdf/RCTPdfView.m b/ios/RCTPdf/RCTPdfView.m index 3b87d51d..b45ca048 100644 --- a/ios/RCTPdf/RCTPdfView.m +++ b/ios/RCTPdf/RCTPdfView.m @@ -45,6 +45,7 @@ - (instancetype)initWithFrame:(CGRect)frame self.maximumZoomScale = 3.0; self.bouncesZoom = NO; self.bounces = YES; + self.delaysContentTouches = NO; // fix statusbar effect when statusbar show/hide if (@available(iOS 11.0, *)) { @@ -63,6 +64,11 @@ - (instancetype)initWithFrame:(CGRect)frame return self; } +- (BOOL)touchesShouldBegin:(NSSet *)touches withEvent:(UIEvent *)event inContentView:(UIView *)view +{ + return NO; +} + - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView {