Screenshot of Swift code: func hasSupplementaryViewAfter() -> Bool { let cellIndex = elements.firstIndex { $0.elementCategory == .cell } ?? .max return elements.enumerated().contains { idx, obj in idx > cellIndex && obj.elementCategory == .supplementaryView } } func hasSupplementaryViewBefore() -> Bool { let cellIndex = elements.firstIndex { $0.elementCategory == .cell } ?? .max return elements.enumerated().contains { idx, obj in idx < cellIndex && obj.elementCategory == .supplementaryView } } func hash(into hasher: inout Hasher) { for elem in elements { elem.hash(into: &hasher) } } override var description: String { "\(super.description) - \(elements.description)" }
https://media.hachyderm.io/media_attachments/files/113/811/109/660/543/744/original/cf655ce1a95f1c06.png