I do not understand how to translate the coordinates of the iphone.
If I make one touch, I will get the coordinate.
if I touch and save it and let it go, it shows the difference between the start and end points.
How to get the absolute touch position?
thanks!
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:touch.view];
NSLog(@"X: %f",location.x);
NSLog(@"Y: %f",location.y);
}
I want to resize an image by touching and dragging (height only)
jacky source
share