I use some UILabels with a UITapGestureRecognizer
inside a UITableViewCell
. The GestureRecognizer works well. But when I tap on the label, I want that the didSelectRowAtIndexPath:
should execute too. Or even just the indexPathForSelectedRow()
method should give me the selected row.
Setting cancelsTouchesInView = false
did not work!
Is this possible? Right now the indexPathForSelectedRow()
method returns nil.
Thanks
Why are you using
UITapGestureRecognizer
? If you want to use that, try to set the tag of label aslabel.tag=indexpath.row
. So you might get the value you are looking at. Regarding my own opinion, I'd remove theuitapgesturerecognizer
and directly usedidselectrowatindexpath
method..EDIT 2:
Try using this solution..it might help you..