tags:

views:

71

answers:

1

Is there a way to get the add (the green circle with the white plus) editing control to track touches. The contacts program for example allows the user to touch either the cell itself or the circles on the left to carry out the add action. Unfortunately, I don't get the same behaviour when I edit my tableViewCells. Only touches on the tableViewCell itself are tracked, touching the add green circle does nothing.

Is there any way to enable tracking of touches for these add editing controls.

Thanks

+1  A: 

Did you implement commitEditingStyle in your UITableViewController?

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    if (editingStyle == UITableViewCellEditingStyleDelete) {
        // Delete the row from the data source
    }   
    else if (editingStyle == UITableViewCellEditingStyleInsert) {
        // Add a new row to the data source     
    }   
}
Glenn Barnett
Thankyou very much, that was it.I didn't implement this method as Apple's "Recipe" example code didn't.I'll be more aware next time of completely trusting Apple's sample code.
Danny Gonzalez