is there a way to get all the section header views that are visible?
something similar to UITableView\'s visibleCells instance method..
to get the current visible sections, u could get it by checking the current visible cells indexpath section, so this function could return to u the visible sections
- (NSArray *)indexesOfVisibleSections {
NSMutableArray *visibleSections = [NSMutableArray array];
for (UITableViewCell * cell in [self.tableView visibleCells]) {
if (![visibleSections containsObject:[NSNumber numberWithInteger:[self.tableView indexPathForCell:cell].section]]) {
[visibleSections addObject:[NSNumber numberWithInteger:[self.tableView indexPathForCell:cell].section]];
}
}
return visibleSections;
}
And to access section view , u can use
- (UITableViewHeaderFooterView *)headerViewForSection:(NSInteger)section;