[Solved] numberOfRowsInSection repeats counting the last section

[ad_1]

Surely you just want to look at the relevant section rather than looping through all the sections. Something like:

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    if([buttonTags containsObject:@(section)]) {
        return 0;
    } else {
        return [arrayOfArrays[section] count];
    }
}

0

[ad_2]

solved numberOfRowsInSection repeats counting the last section