is there a way to get all the section header views that are visible?
something similar to UITableView\'s visibleCells instance method..
I really liked @adamsiton's solution and I ended up translating it to swift. Here it is, FYI.
I called the file UITableView+VisibleSections.swift
import UIKit
public extension UITableView {
var indexesOfVisibleSections: [Int] {
// Note: We can't just use indexPathsForVisibleRows, since it won't return index paths for empty sections.
var visibleSectionIndexes = [Int]()
for i in 0..