获取touch对象和其点击的坐标点
2017-03-06 本文已影响54人
ladispartion
- (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) {
}
}