Skip to content

Commit

Permalink
修复QuickWebQRCodePlugin手势导致不能复制网页文本的BUG。
Browse files Browse the repository at this point in the history
  • Loading branch information
pcjbird committed Jan 9, 2018
1 parent 9745afa commit b6142a9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion QuickWebKit.podspec
Original file line number Diff line number Diff line change
@@ -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 视图控制器,您可以基于它设计您的浏览器插件,然后像积木一样来组装它们。
Expand Down
3 changes: 3 additions & 0 deletions QuickWebKit/QuickWebKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -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本地化错误。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion QuickWebKit/Supporting Files/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.8</string>
<string>1.0.9</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
Expand Down

0 comments on commit b6142a9

Please sign in to comment.