Skip to content

Instantly share code, notes, and snippets.

View mamouneyya's full-sized avatar

Ma'moun Diraneyya mamouneyya

View GitHub Profile
@kristopherjohnson
kristopherjohnson / reconfigureVisibleCells.m
Last active January 16, 2020 18:59
Update visible cells from a UITableViewController without calling -[UITableView reloadData]
- (void)reconfigureVisibleCells
{
NSInteger sectionCount = [self numberOfSectionsInTableView:self.tableView];
for (NSInteger section = 0; section < sectionCount; ++section) {
NSInteger rowCount = [self tableView:self.tableView numberOfRowsInSection:section];
for (NSInteger row = 0; row < rowCount; ++row) {
NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:section];
UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];