Posted By

B0nis on 07/11/10


Tagged

UITableView


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

bobbym245


delete a Table-View row


 / Published in: iPhone
 

  1. [tableView setEditing:YES];
  2.  
  3. - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
  4. int chapter = [[[book bookmarks] objectAtIndex: indexPath.row] intValue];
  5. [book removeBookmark: chapter];
  6. [tableView deleteRowsAtIndexPaths: [NSArray arrayWithObject: indexPath] withRowAnimation: UITableViewRowAnimationFade];
  7. }

Report this snippet  

You need to login to post a comment.