I'm trying to build a simple photo crop utility where user can touch and select the picture boundary. I need the exact touch coordinates w.r.t the image.
When I use
CGImageRef imageRef = [staticBG.image CGImage];
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInView:[self view]];
y3=location.y;
x3=location.x;
the coordinates (x3,y3) comes in absolute scale and is not useful for handling imageRef.
I tried using
UITouch *touch = [touches anyObject];
CGPoint touchPoint = [touch locationInView:staticBG];
but still the coordinates do not quite match up.
Please help.