My table view custom cell row has 3 elements: A UITextField embedded in a UIScrollView, a label, and a button. 'didSelectRowAt indexPath' function ONLY runs when any 2 of the 3-row elements are simultaneously tapped. Why is this? I did not add any touch gestures.
potentially useful information: tableview delegate and dataSource are set to self. Removing tableView.reloadData() will result in changes from code not being reflected in the UI. self.tableView.beginUpdates()
& self.tableView.endUpdates()
have no effect.
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
print("test")
if dataSource.data[indexPath.row].isDataCollapsed() {
print("expanded")
dataSource.data[indexPath.row].isCollapsed = false
tableView.reloadData()
}
}
Thank you in advance!
EDIT:
I resorted to using touch gestures since I couldn’t figure it out. Thank you.