I have five fields setup on a Signup controller. Username, displayname, password, confirm password and email address.
They are setup with the following:
You can create by using tags.
in cellForRowAtIndexPath
static NSString *cellId = @"Cell";
CustomCell *cell = (CustomCell *)[self.tblView dequeueReusableCellWithIdentifier:cellId];
if (cell == nil) {
NSArray * myNib;
myNib =[[NSBundle mainBundle]loadNibNamed:@"CustomCell" owner:self options:nil];
cell = (CustomCell *)[myNib lastObject];
}
[cell.deleteBtn addTarget:self action:@selector(cellDeleteAction:) forControlEvents:UIControlEventTouchUpInside];
cell.deleteBtn.tag = indexPath.row;
[cell.editBtn addTarget:self action:@selector(cellEditAction:) forControlEvents:UIControlEventTouchUpInside];
cell.editBtn.tag = indexPath.row;
after that you can create button action method like this,
- (void) cellEditAction:(UIButton *)sender {
UIButton *button = (UIButton *)sender;
NSString *rateId = [[resDict valueForKey:@"value"]objectAtIndex:button.tag];
}