Q:

UITableView didSelect not working in swift 3.0

When i select any row than didselect is not getting called.It's color also changes to blue on selection. but didSelect is not working.Delegate, DataSources and Table outlet are also connected. Here is my Code:
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {

    categoryLbl.text = categoryArray[indexPath.row].type
    dataDict.setValue(categoryArray[indexPath.row].type, forKey: "category")
    categoryTable?.isHidden = true
}

override func viewDidLoad() {
    super.viewDidLoad()

    imagePicker.delegate = self
    NotificationCenter.default.addObserver(self, selector: #selector(self.keyboardNotification(notification:)), name: NSNotification.Name.UIKeyboardWillChangeFrame, object: nil)
    categoryTable?.isHidden = true

    self.geCategoryData()

    let tap: UITapGestureRecognizer = UITapGestureRecognizer(target: self, action:#selector(AddFeedbackViewController.dismissKeyboard))
    view.addGestureRecognizer(tap)

}

A:

Try this, It will solve your problem
tap.delegate = self // add this in viewdidLoad()

extension YourViewContoller: UIGestureRecognizerDelegate {

    func gestureRecognizer(gestureRecognizer: UIGestureRecognizer, shouldReceiveTouch touch: UITouch) -> Bool {
        if touch.view != nil && touch.view!.isDescendantOfView(self.tableView) {
            return false
        }
        return true
    }
}

