views:

28

answers:

1

The cell in this iPhone TableView definitely has a Detail-Disclosure-Button.

When I tap it... shouldn't this code give me access to the button?

Instead detailButton is always just null.

- (void) tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *aCell = [tableView cellForRowAtIndexPath:indexPath];
    UIButton *detailButton = (UIButton *)[aCell accessoryView];
}
A: 

are you over-riding the cell accessory button in 'cellForRowAtIndexPath' by any chance?

sujee