0

I have a use case where I'm adding a UITapGestureRecogniser to a UITableViewCell subclass which already has existing behaviour for navigating to another screen when tapped. The issue is that the tap seems to be 'captured' by the recogniser and then not sent on afterwards - the code in my custom recogniser is called, but tapping the cell no longer navigates to a different screen. Preliminary research suggests that if a recogniser handles a gesture then it isn't sent any further along - is it possible to change this? I have researched the responder chain but to no avail.

Cheers

Shivam Tripathi
  • 1,405
  • 3
  • 19
  • 37
Josh Thieme
  • 63
  • 1
  • 5

1 Answers1

0

For the benefit of anyone else who might happen upon this same issue in the future, I have solved my problem using this answer. All I needed to do was the following:

let recogniser = UITapGestureRecognizer(target: self, action: #selector(clickHandler))
recogniser.cancelsTouchesInView = false
Josh Thieme
  • 63
  • 1
  • 5