I\'m able to determine the coordinates of a touch event on a UIImageView. I need to then convert these coordinates to the coordinates of the image being displayed - which sh
Something like this should get you going.
CGPoint imageViewPoint = [touch locationInView:imageView];
float percentX = imageViewPoint.x / imageView.frame.size.width;
float percentY = imageViewPoint.y / imageView.frame.size.height;
CGPoint imagePoint = CGPointMake(image.size.width * percentX, image.size.height * percentY);
Assuming the UIImageView
is called imageView
the UITouch
is called touch
and the UIImage
is called image
.