I’ve subclassed UITableViewCell and inside the class I’ve added a UITapGestureRecognizer (which fires a method called animateCell) to the contentView.
What I’m trying to do: When the user taps a cell, animateCell is called (which works), but I also want didSelectRowAtIndexPath to be called so that I can add the selected object from the table’s source-array into another array.
What I’ve noticed is that having the UITapGestureRecognizer cancels out didSelectRowAtIndexPath. Is there any way I can have both at the same time?
It’s kind of hackish, but you can try creating a property in your
UITableViewCellsubclass that holds a pointer back to yourUITableViewController. Then from your gesture recognizer you could do something like this: