diff options
Diffstat (limited to 'plugins/cordova-plugin-ios-longpress-fix/src/ios')
| -rwxr-xr-x | plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.h | 7 | ||||
| -rwxr-xr-x | plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.m | 35 |
2 files changed, 0 insertions, 42 deletions
diff --git a/plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.h b/plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.h deleted file mode 100755 index 132bb8ad..00000000 --- a/plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.h +++ /dev/null @@ -1,7 +0,0 @@ -#import <Cordova/CDVPlugin.h> - -@interface LongPressFix : CDVPlugin - -@property (nonatomic,strong) UILongPressGestureRecognizer *lpgr; - -@end
\ No newline at end of file diff --git a/plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.m b/plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.m deleted file mode 100755 index 9f3d8521..00000000 --- a/plugins/cordova-plugin-ios-longpress-fix/src/ios/LongPressFix.m +++ /dev/null @@ -1,35 +0,0 @@ -#import "LongPressFix.h" - -@implementation LongPressFix - -- (void)pluginInitialize { - self.lpgr = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(handleLongPressGestures:)]; - self.lpgr.minimumPressDuration = 0.45f; - self.lpgr.allowableMovement = 100.0f; - - NSArray *views = self.webView.subviews; - if (views.count == 0) { - NSLog(@"No webview subviews found, not applying the longpress fix"); - return; - } - for (int i=0; i<views.count; i++) { - UIView *webViewScrollView = views[i]; - if ([webViewScrollView isKindOfClass:[UIScrollView class]]) { - NSArray *webViewScrollViewSubViews = webViewScrollView.subviews; - UIView *browser = webViewScrollViewSubViews[0]; - [browser addGestureRecognizer:self.lpgr]; - NSLog(@"Applied longpress fix"); - break; - } - } -} - -- (void)handleLongPressGestures:(UILongPressGestureRecognizer *)sender { - if ([sender isEqual:self.lpgr]) { - if (sender.state == UIGestureRecognizerStateBegan) { - NSLog(@"Ignoring a longpress in order to suppress the magnifying glass (iOS9 quirk)"); - } - } -} - -@end
\ No newline at end of file |
