I have a UITableView that uses custom background images for cells (rounded edges for the first & last cell). When the first or last cell is deleted (via commitEditingStyleForRowAtIndexPath), the tableView doesn't immediately redraw the cells. That is, if I delete the first cell (with the rounded edges), the second cell becomes the first cell (as expected), but it doesn't have the rounded edges background image. It is not until this cell is dragged out of the view, or I switch to a different tab & back, that the "new" first cell has the appropriate background image. Now, I can make a call to reloadData after the delete operation and this forces the whole table to redraw, which seems to work, but the API docs advise against doing this & it seems inefficient. So, my question is, where in the call stack is the best place to trigger a redraw of my "new" first cell after a commitEditingStyleForRowAtIndexPath operation?
Reload only that row/cell:
- (void)reloadRowsAtIndexPaths:(NSArray *)indexPaths withRowAnimation:(UITableViewRowAnimation)animation
and give it an indexPath row of 0 or (last) depending on which one it was.