I placed a small UIView
inside a UITableViewCell
.
- In case of a tapping on such
UIView
, I would like to open a popup. - In case of a tapping outside such
UIView
, I would like to perform what it's defined in theUITableView
"didSelectRowAtIndexPath" function.
What it's happening at the moment is that when I click on the view both things happen: the popup is opened and the "didSelectRowAtIndexPath" function is trigged.
How can I make sure that when I click on that UIView
the "didSelectRowAtIndexPath" function is not triggered?
current implementation:
I defined a UITapGestureRecognizer
for the UIView
inside my custom UITableViewCell
class.
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(MyCustomTableViewCell.clickOnHelp(_:)))
myClickAreaUIView.addGestureRecognizer(tapGesture)