DAModularTableView icon indicating copy to clipboard operation
DAModularTableView copied to clipboard

Reloading the table

Open mrjjwright opened this issue 13 years ago • 1 comments

I love this class, thanks so much! When reloading the table I get:

self.tableView.sections = [NSMutableArray array];
[self.tableView reloadData];

When switching between details views on the iPad this causes the sections & rows to flicker as they are reloaded. Is there another way to clear out the sections and reload without this flicker? I tried disabling animations but I can't figure out why the tableView doesn't draw in one pass.

mrjjwright avatar Jan 14 '13 20:01 mrjjwright

I got this to work by doing the following

self.tableView.sections = [NSMutableArray array];
[self.tableView reloadData];

[self.tableView beginUpdates];
[UIView setAnimationsEnabled:NO];
....//Reload sections and rows
[UIView set animationEnabled:YES];
[self.tableView endUpdates];

mrjjwright avatar Jan 14 '13 20:01 mrjjwright