From b6142a9cf90d0ced1d6225bc10a612b023e5b0f1 Mon Sep 17 00:00:00 2001 From: pcjbird Date: Tue, 9 Jan 2018 15:50:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DQuickWebQRCodePlugin=E6=89=8B?= =?UTF-8?q?=E5=8A=BF=E5=AF=BC=E8=87=B4=E4=B8=8D=E8=83=BD=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E7=BD=91=E9=A1=B5=E6=96=87=E6=9C=AC=E7=9A=84BUG=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QuickWebKit.podspec | 2 +- QuickWebKit/QuickWebKit.h | 3 +++ .../QuickWebQRCodePlugin/QuickWebQRCodePlugin.m | 16 +++++++++++++++- QuickWebKit/Supporting Files/Info.plist | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/QuickWebKit.podspec b/QuickWebKit.podspec index ebd7c67..5ce0675 100644 --- a/QuickWebKit.podspec +++ b/QuickWebKit.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "QuickWebKit" - s.version = "1.0.8" + s.version = "1.0.9" s.summary = "A great & strong plugin based WebViewController. 一款基于插件的 WebView 视图控制器,您可以基于它设计您的浏览器插件,然后像积木一样来组装它们。" s.description = <<-DESC A great & strong plugin based WebViewController. 一款基于插件的 WebView 视图控制器,您可以基于它设计您的浏览器插件,然后像积木一样来组装它们。 diff --git a/QuickWebKit/QuickWebKit.h b/QuickWebKit/QuickWebKit.h index c2ff359..35a200a 100644 --- a/QuickWebKit/QuickWebKit.h +++ b/QuickWebKit/QuickWebKit.h @@ -8,6 +8,9 @@ // 框架名称:QuickWebKit // 框架功能:A great & strong plugin based WebViewController. 一款基于插件的 WebView 视图控制器,您可以基于它设计您的浏览器插件,然后像积木一样来组装它们。 // 修改记录: +// pcjbird 2018-01-09 Version:1.0.9 Build:201801090003 +// 1.修复QuickWebQRCodePlugin手势导致不能复制网页文本的BUG。 +// // pcjbird 2018-01-09 Version:1.0.8 Build:201801090002 // 1.优化QuickWebQRCodePlugin插件手势。 // 2.修复QuickWebQRCodePlugin本地化错误。 diff --git a/QuickWebKit/QuickWebPlugins/QuickWebQRCodePlugin/QuickWebQRCodePlugin.m b/QuickWebKit/QuickWebPlugins/QuickWebQRCodePlugin/QuickWebQRCodePlugin.m index 5d7f878..5e3f7f5 100644 --- a/QuickWebKit/QuickWebPlugins/QuickWebQRCodePlugin/QuickWebQRCodePlugin.m +++ b/QuickWebKit/QuickWebPlugins/QuickWebQRCodePlugin/QuickWebQRCodePlugin.m @@ -78,7 +78,21 @@ - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecogni - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { - return YES; + if(![self.targetWebController isKindOfClass:[QuickWebViewController class]]) return NO; + SmartJSWebView *webView = self.targetWebController.webView; + if(![webView isKindOfClass:[SmartJSWebView class]])return NO; + CGPoint pt = [gestureRecognizer locationInView:self.targetWebController.webView.webView]; + __block BOOL bResult = NO; + [webView evaluateJavaScript:[NSString stringWithFormat:@"SmartJSGetHTMLElementsAtPoint(%li,%li);",(long)pt.x,(long)pt.y] completionHandler:^(id result, NSError *error) { + NSString *tags = result; + if ([tags rangeOfString:@",A,"].location != NSNotFound || [tags rangeOfString:@",IMG,"].location != NSNotFound) + { + bResult = YES; + return; + } + bResult = NO; + }]; + return bResult; } -(void)longtap:(UILongPressGestureRecognizer * )longtapGes diff --git a/QuickWebKit/Supporting Files/Info.plist b/QuickWebKit/Supporting Files/Info.plist index 706e239..864c728 100644 --- a/QuickWebKit/Supporting Files/Info.plist +++ b/QuickWebKit/Supporting Files/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0.8 + 1.0.9 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass