I have lots of data and lots of rows in my tableView. when data changes I want to update my visible cells on the screen, I really don\'t want to use reloadData because it\'s
You can:
[tableView reloadRowsAtIndexPaths:[tableView indexPathsForVisibleRows]
withRowAnimation:UITableViewRowAnimationNone];
Try calling 'deleteRowsAtIndexPaths', a method of UITableView, right after you delete the model from your data source. For example, if you are deleting a row in editing mode, you could write something like the code below. Note that the first line in the 'if' statement removes the object from the data source, and the second line cleans up the table:
-(void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if ( editingStyle == UITableViewCellEditingStyleDelete ) {
[[[[[ItemsStore sharedStore] parameterArray] objectAtIndex:indexPath.section] objectForKey:@"data"] removeObjectAtIndex:indexPath.row];
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
}
For Swift 3:
tableView.reloadRows(at: tableView.indexPathsForVisibleRows!, with: .none)