0

I have custom cell which contains number of rows in it.i want to write it's Action(click event) so how should i identify which buttons clicked and how can i write it's click event for it.Please give me some guidelines for that.i have not implemented yet.

Ankit Vyas
  • 7,499
  • 13
  • 53
  • 88
  • 1
    possible duplicate of [Detecting which UIButton was pressed in a UITableView](http://stackoverflow.com/questions/1802707/detecting-which-uibutton-was-pressed-in-a-uitableview) – Vladimir Aug 13 '10 at 12:46

1 Answers1

2

Use the tag property of the button.

When you make the button, say:

button.tag = indexPath.row.

Then, on the action, you can pull that tag, which will be unique, and act accordingly.

DexterW
  • 5,584
  • 5
  • 32
  • 45