获取touch对象和其点击的坐标点

- (void)touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event

{

//获取touch对象

UITouch*touch = [touchesanyObject];

CGPointpoint = [touchlocationInView:self];

[selftouchFace:point];

//判断点击点是否在某一范围内(例如是否在_view上)

boolisContains =CGRectContainsPoint(_view.frame, [touchlocationInView:self.view]);

if(isContains) {

 }

}

你可能感兴趣的:(获取touch对象和其点击的坐标点)