读书人

获取抚摸点的坐标位置

发布时间: 2012-06-28 15:20:03 作者: rapoo

获取触摸点的坐标位置

获取触摸点的坐标位置

?

//触摸事件-(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);}
?

?

读书人网 >移动开发

热点推荐