-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom];
CGRect frame = CGRectMake(0.0, 10.0, 24, 24);
button.frame = frame;
[button setTag:((indexPath.section & 0xFFFF) << 16) |
(indexPath.row & 0xFFFF)];
[button setImage:[UIImage imageNamed:@"link-buttoni4.png"] forState:UIControlStateNormal];
[button setImage:[UIImage imageNamed:@"link-button-onclicki4.png"] forState:UIControlStateHighlighted];
[button setSelected:NO];
// set the button's target to this table view controller so we can interpret touch events and map that to a NSIndexSet
[button addTarget:self action:@selector(checkButtonTapped:) forControlEvents:UIControlEventTouchUpInside];
button.backgroundColor = [UIColor clearColor];
cell.accessoryView = button;
}
-(void)checkButtonTapped:(UIButton *)sender {
NSUInteger section = ((sender.tag >> 16) & 0xFFFF);
NSUInteger row = (sender.tag & 0xFFFF);
NSLog(@"Button in section %i on row %i was pressed.", section, row);
}