I have added UITableView on top of UIView. Added tap gesture to UIView using below code:
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(tapToClose))
tapGesture.cancelsTouchesInView = false
tapGesture.numberOfTapsRequired = 1
vwForTouchClose.addGestureRecognizer(tapGesture)
when I select on cell didSelectRowAt not getting called instead gesture method is called. Below is ur code at didSelectRowAt:
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
}
Please help me to solve this issue.