美文网首页
获取touch对象和其点击的坐标点

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

作者: ladispartion | 来源:发表于2017-03-06 10:27 被阅读54次

- (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对象和其点击的坐标点

      本文链接:https://www.haomeiwen.com/subject/javygttx.html