how to make UITableViewCellEditingStyleInsert button call insertNewObject
I add a cell to th开发者_JAVA技巧e end of a section when in editing mode and I give it UITableViewCellEditingStyleInsert
. how do I set what function that button calls?
Use this method of UITableView:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if(indexPath.row == editStyleRowInd){
//any actions here
}
}
Where editStyleRowInd index of last row in the table
精彩评论