iPhone - How to determine in which cell a button was pressed in a custom UITableViewCell

后端 未结 10 1942
遥遥无期
遥遥无期 2021-01-01 15:45

I currently have a UITableView that is populated with a custom UITableViewCell that is in a separate nib. In the cell, there are two buttons that are wired to actions in th

10条回答
  •  清酒与你
    2021-01-01 16:22

    You can access the buttons superview to get the UITableViewCell that contains your button, but if you just need the row number, you can use the tag property like the previous post deacribes.

提交回复
热议问题