I have an UIImageView inside a subclass of UITableViewCell in which I wired up with UITapGestureRecognizer. However, when I press on the image the action is not triggered. What’s being triggered is the didSelectRowAtIndexPath.. why is this?
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapGesture:)];
tapGesture.numberOfTapsRequired = 1;
tapGesture.numberOfTouchesRequired = 1;
[imageView addGestureRecognizer:tapGesture]; [tapGesture release];
Also one minor question is that I have a UITextView in the cell, however when I click on the text it did not trigger the didSelectRowAtIndexPath, why is this and how do I change it?
UIImageView has userInteractionEnabled set to NO by default. Try setting it to YES
For your other question, try setting the editable property to NO for the UITextView.