I have a tableView completed fill on view. when i tapped on a cell tableView:didSelectRowAtIndexPath: is getting fired, but when i wrote touchesBegan:withEvent to find touch and Pinch events of a tableView it was not fired. Tableview is above the view is that the reason of not firing, if yes how to find when tableView or its certain cell is touched or pinched.
I found a way to find Pinch Or touch in a Table View cell, declare UIPinchGestureRecognizer
object first in tableView:didSelectRowAtIndexPath:
i.e
UIPinchGestureRecognizer *pinch = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handlePinch:)];
[tblAccountsList addGestureRecognizer:pinch];
[pinch release];
then write the selector method below…
- (void)handlePinch:(UIGestureRecognizer *)recognizer {
NSLog(@"Pinch");
}
when i set breakpoint it is executing, but the method was getting called for 3 times.
If any one find the solution share it please…
Thanks in advance…
touchesBegan is a UIView and UITableViewCell method rather than a UIViewController & UITableViewController method. so you may create the the custom class for UITableViewCell it recognize the touch event and touch delegate it is working for me.
In Table view you can add