iOS 获取当前点击的座标

iOS 获取当前点击的坐标
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    NSSet *allTouch = [event allTouches];
    UITouch *touch = [allTouch anyObject];
    CGPoint point = [touch locationInView:[touch view]];
    int x = point.x;
    int y = point.y;
    NSLog(@"x,y == (%d, %d)", x, y);
}
1楼归档科技人
get