views:

17

answers:

1

I need to know which cell is touched when any button inside the cell is touched. I have custom UIButton *button1 in the cell and UIButton *button2 on the cell.imageView.image of the cell. I wrote selectors for both buttons.; But, I could not differentiate the buttons for each cell. How do I know which cell button was touched. What to do, to know that a particular cell's button was touched ?

Thank you.

A: 

There are several approaches. If you create the cells programatically, you do something like set the buttons tag to the row number of the cell. Or you could have the action method query its sender (your button) for superview to location the cell.

Paul Lynch
Please give me some kind of direction how to do. I do not have idea of both tag usage and superview method usage.
srikanth rongali
I got it worked . I use the superView method. Thank You.
srikanth rongali