I have made a table and contents some values, I have a button coding like
cell.textLabel.textColor = [UIColor whiteColor];
UIButton *btn=[UIButton buttonWithType:UIButtonTypeCustom];
[btn setBackgroundColor:[UIColor clearColor]];
[btn setBackgroundImage:[UIImage imageNamed:@"edit_button.png"] forState:UIControlStateNormal];
[btn setFrame:CGRectMake(290, 15, 15, 15)];
[btn addTarget:self action:@selector(editTable:)
forControlEvents:UIControlEventTouchUpInside];
[cell.contentView addSubview:btn];
NSString *cellValue = [myArrayNew objectAtIndex:indexPath.row];
cell.textLabel.text = cellValue;
return cell;
I want to click that button and take values from that particular index,
like
Ali (button here) --------index 0 Sajid (button here) --------index 1 Robert (button here) --------index 2 RaM (button here) --------index 3
Theser are cells of table, now how can I get index as I click that button?
if you are not getting my question, you can ask me again...