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
solved numberOfRowsInSection repeats counting the last section