I have a custom UITableView in a ViewController. My custom table has custom UITableViewCells. This is the code inside my ViewController:
ViewDidLoad:
self.firstListTable.dataSource = self
self.firstListTable.delegate = self
self.firstListTable.register(UINib(nibName: "firstQueueCell", bundle: Bundle.main), forCellReuseIdentifier: "firstCell")
self.searchListTable.dataSource = self
self.searchListTable.delegate = self
self.searchListTable.allowsSelection = true
self.searchListTable.register(UINib(nibName: "SearchCell", bundle: Bundle.main), forCellReuseIdentifier: "SearchCell")
self.searchListTable.separatorStyle = .none
UITableViewFunctions:
func tableView(_ tableView: UITableView, didHighlightRowAt indexPath: IndexPath) {
if tableView == self.searchListTable {
print("hello")
}
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath){
print("hello")
}
didHighlightRowAt works but didSelectRowAt does not.
I tried this: didSelectRowAtIndexPath: not being called
What other causes could there be?
Thanks!