How do get the view that is the tapped detail-disclosure-button.

Posted by Roberta on Stack Overflow See other posts from Stack Overflow or by Roberta
Published on 2010-06-09T23:12:35Z Indexed on 2010/06/09 23:52 UTC
Read the original article Hit count: 133

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];
}

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uitableview