UIButton not responding used in a custom UITableViewCell

后端 未结 6 1491
感动是毒
感动是毒 2020-12-20 19:29

I know this issue is already been asked few times in SO. Despite trying those out, I am still unable to solve my problem.

I am using a UITableView inside a UIViewCo

6条回答
  •  死守一世寂寞
    2020-12-20 20:02

    I would have userInteractionEnabled set to true on the table view cell as well. I would prevent taps using the UITableView allowsSelection to false

    Also remember to remove the target and action in tableView:cellForRowAtIndexPath: since the cells are recycled, the button might already have the target and action, it might add a second.

提交回复
热议问题