I have a custom cell for a UITableView. The cell has a button in it called ShowData. I add a selector for that button:
[cell.ShowData addTarget:self action:@selector(ShowData:) forControlEvents:UIControlEventsTouchUpInside];
in My ShowData: method, I’d like some of the info that I used in displaying the cell. How can I pass information in this way? Thanks.
Your
showData:will receive the button itself as itssenderargument. You can walk up the button’s superviews until you find your custom cell and then access any properties you’ve added to the cell.