webView 结合js 获取 touch 坐标
来源:互联网 发布:双色球全包号过滤软件 编辑:程序博客网 时间:2024/05/15 02:45
- (id)init{
self = [super init];
if (self) {
UITapGestureRecognizer* singleTap = [[UITapGestureRecognizeralloc]initWithTarget:selfaction:@selector(handleSingleTap:)];
[selfaddGestureRecognizer:singleTap];
singleTap.delegate =self;
singleTap.cancelsTouchesInView =NO;
[singleTap release];
}
returnself;
}
//webView 不响应touch 时间
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
[supertouchesBegan:toucheswithEvent:event];
CGPoint superPoint = [[touchesanyObject]locationInView:self.superview];
CGPoint point = [[touchesanyObject]locationInView:self];
NSLog(@"super %f,%f",superPoint.x,superPoint.y);
NSLog(@"%f,%f",point.x,point.y);
}
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer{
returnYES;
}
-(void)handleSingleTap:(UITapGestureRecognizer *)sender{
CGPoint point = [sender locationInView:self];
NSLog(@"handleSingleTap!pointx:%f,y:%f",point.x,point.y);
}
- webView 结合js 获取 touch 坐标
- js获取控件坐标
- js获取元素坐标
- js 获取元素坐标
- js获取控件坐标
- js获取鼠标坐标
- js获取鼠标坐标
- JS获取鼠标坐标
- js获取鼠标坐标
- js获取鼠标坐标
- js获取网页文档坐标
- js 获取鼠标点击坐标
- js获取元素坐标方法
- js 获取html 控件坐标
- JS 获取页面元素坐标
- js 页面获取坐标点
- js获取鼠标坐标位置
- JS获取鼠标坐标代码
- js中onchange在各浏览器中的扩展
- POJ 题目分类与计划
- 二次开发与可视通讯源码分享
- 跟我一起玩Win32开发(12):使用控件——单选按钮
- setup factory打包工具的复杂设置
- webView 结合js 获取 touch 坐标
- FreePenalty
- 十八. 和系统运行状况相关的Shell命令:
- sql汇总
- cstdio (stdio.h)
- IOS---NSdata 与 NSString,Byte数组,UIImage 的相互转换
- 学习iPhone UIKit 9
- 第2章 C语言概述
- android 屏幕适配问题