ответ

3
-(void) handleTapGesture:(UIGestureRecognizer *) sender { 

    CGPoint tapPoint = [sender locationInView:someView]; 
    int tapX = (int) tapPoint.x; 
    int tapY = (int) tapPoint.y; 
    NSLog(@"TAPPED X:%d Y:%d", tapX, tapY); 
} 
+0

Большое спасибо –

0

Один из лучших способов, чтобы получить сенсорную точку от CCTouchMoved, как показано ниже, и объявить переменную глобально, так что вы можете использовать его для других.

Объявление "CGPoint * touchLocation;" в вашем файле заголовка.

-(void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event{ 
//get locations of touch 
touchLocation = [touch locationInView:[touch view]]; 
NSLog(@"Touch Points are %f, %f", touchLocation.x, touchLocation.y); 

}

+0

Большое спасибо –