首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

获取抚摸点的坐标位置

2012-06-28 
获取触摸点的坐标位置获取触摸点的坐标位置?//触摸事件-(void)touchesBegan:(NSSet *)touches withEvent:(

获取触摸点的坐标位置

获取触摸点的坐标位置

?

//触摸事件-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{NSSet *allTouches = [event allTouches];UITouch *touch = [allTouches anyObject];CGPoint point=[touch locationInView:[touch view]];int x=point.x;int y=point.y;NSLog(@"touch (x,y) is (%i,%i)",x,y);}
?

?

热点排行