user1007522
user1007522

Reputation: 8118

UITableViewCell and UITextField with user interaction disabled doesn't call didSelectRow

My cell has a UITextField (bound to all the edges) with isUserInteractionEnabled on false. So I expect that when I click the cell the didSelectRowAt is called.

Nowm this never happens. It doesn't call the didSelectRowAt function.

Is there any way to find out who is consuming my event? Also in the view debugger, I don't see any views on top of it.

Upvotes: 0

Views: 127

Answers (2)

Abhishek Jain
Abhishek Jain

Reputation: 4739

  • Make sure you implemented UITableViewDelegate.
  • Make sure you have not added UITapGestureRecognizer anywhere in your view.

Upvotes: 1

Truong Le
Truong Le

Reputation: 111

  • Make sure your VC is delegate of UITableView
  • Make sure your tableView selection is not "No Selection"
  • And final, try to use

    textfield.isEnable = false instead of textfield.isUserInteractionEnable = false

Upvotes: 1

Related Questions