Hey fellow MR developers, I'm trying to figure out how to determine which "row" a detailed disclosure button belongs to when it's clicked. I have the action set to a method, which is being called, but I don't know how to figure out the "indexPath," if you're familiar with other tableview code.
Edit: I hate it how you can search everywhere, post a Q on here, then figure it out for yourself 5 minutes later.
In case anyone else ever wonders, you use the UITableViewDelegate method:
Code:
[cell setAccessoryType:UITableViewCellAccessoryDetailDisclosureButton];
[cell setAccessoryAction:@selector(editSubject:)];
[cell setTarget:self];
Edit: I hate it how you can search everywhere, post a Q on here, then figure it out for yourself 5 minutes later.
In case anyone else ever wonders, you use the UITableViewDelegate method:
Code:
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath