Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
delete cell int able view
//from view did load add edit
- (void)viewDidLoad
self.memberView.allowsMultipleSelectionDuringEditing = NO;
[super viewDidLoad];
[resultView setHidden:YES];
// enable
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
// Return YES if you want the specified item to be editable.
return YES;
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
Members *member = [self.members objectAtIndex:indexPath.row];
// get customer_id and then update to api
// remove from datasource
[memberdat removeObjectAtIndex:indexPath.row];
// remove from table view
// [memberView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationMiddle];
// [memberView endUpdates];
rowcount = rowcount - 1;
// dififrent betwen understnad and cpy
[memberView reloadData];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment