How to get the add editing controls in a uitableviewcell to track touches
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 t开发者_如何学PythonableViewCell 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
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
}
}
精彩评论