Skip to content

Instantly share code, notes, and snippets.

@marshluca
Created November 15, 2010 03:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marshluca/676366 to your computer and use it in GitHub Desktop.
Save marshluca/676366 to your computer and use it in GitHub Desktop.
removeCellAtIndexPath
- (NSIndexPath *)indexPath
{
NSUInteger row = [sender tag] - 300;
NSUInteger section = 0;
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:section];
return indexPath;
}
- (void)removeCellAtIndexPath:(NSIndexPath *)indexPath
{
[itemArray removeObjectAtIndex:indexPath.row];
[self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationNone];
[self.tableView reloadData];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment