What to return from collectionView(_:viewForSupplementaryElementOfKind:at:) when you want to return nothing? : <p>I have a UICollectionView that has section headers, but not section footers. As such, I don't have a defined footer view.
<a href="https://developer.apple.com/documentation/uikit/uicollectionviewdatasource/1618037-collectionview" rel="noreferrer">Apple's documentation</a> states that <code>You must not return nil from this method.</code> </p>

<pre><code>func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -&gt; UICollectionReusableView {
    switch kind {
    case UICollectionElementKindSectionHeader:
        let headerView = collectionView.dequeueReusableSupplementaryView(ofKind: kind,
                                                                         withReuseIdentifier: "MyHeaderView",
                                                                         for: indexPath) as! MyHeaderView
        switch indexPath.section
        {
        case 0:
            headerView.label_title.text = "SOME HEADER"
        case 1:
            headerView.label_title.text = "ANOTHER HEADER"
        default:
            headerView.label_title.text = "UNKNOWN HEADER"
        }
        return headerView
    default:
        assert(false, "Unexpected element kind") // Not a good idea either
    }
    return nil // NOPE, not allowed
}
</code></pre>
