I'm working with UICollectionViewController
. At some point In need to make some configurations to the visible footers and for each one of them, I need to know its' current section number. Current because sections may be replaced and the section of a reusable view may change.
self.collectionView.visibleSupplementaryViews(ofKind: UICollectionView.elementKindSectionFooter)
.filter { $0.reuseIdentifier == reuseIdentifierFooter}
.forEach {
// Here I need to know the section number of each view
}