HomeiOS Developmentios - TableView didSelectRowAt not triggered when interacting with TextField inside a...

ios – TableView didSelectRowAt not triggered when interacting with TextField inside a cell


I’ve encountered a difficulty the place the didSelectRowAt methodology of my TableView just isn’t triggered once I click on inside a TextField that’s positioned inside a TableViewCell. Right here is the code snippet I’m utilizing:

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
    if (indexPath.row == 0) {
         // do one thing
         tableView.beginUpdates()
         tableView.endUpdates()
    }
}

I wish to know the answer to repair this drawback and make sure that the didSelectRowAt methodology is known as even when interacting with the TextField contained in the TableViewCell. Any insights or ideas can be significantly appreciated. Thanks!

The picture under illustrates the view construction and hierarchy.
Text field is inside a table view cell

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments