Posted By

rabc on 07/15/10


Tagged

iphone UITableView TableView


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

umang_nine
bobbym245
rvachere
cnathan


Delete a table's row


 / Published in: Objective C
 

Just add this delegate method to enable the row delete.

  1. - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
  2. {
  3. [self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
  4.  
  5. }

Report this snippet  

You need to login to post a comment.