Im trying to implement a popupview that targets a button inside a webview.
For that purpose I need to get the CGRect of the that button, which I figure is best done by getting the position of the last touch using the UIResponder > touchesEnded method.
Problem is, I dont have a clue where to put the code. I tried all my projects files (which is an iPad split-view app, containing two viewcontrollers and a appdelegate), but none of them trigger the method.
For that purpose I need to get the CGRect of the that button, which I figure is best done by getting the position of the last touch using the UIResponder > touchesEnded method.
Problem is, I dont have a clue where to put the code. I tried all my projects files (which is an iPad split-view app, containing two viewcontrollers and a appdelegate), but none of them trigger the method.
Code:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
CGPoint touchPosition = [touch locationInView:self.view];
// DEBUG:
NSLog(@"--== touchPosition = %@", NSStringFromCGPoint(touchPosition));
// TODO: Construct CGRect somehow using the CGPoint
}