title: UICollectionElementKindSectionFooter Never Detected in viewForSupplementaryElementOfKind
body: <p>I am having a problem where the <code>viewForSupplementaryElementOfKind</code> delegate function never detect <code>UICollectionElementKindSectionFooter</code>.</p>
  
  <p>So, the headers are created, but the footer is never created.</p>
  
  <p>I have also implemented both delegate <code>referenceSizeForHeaderInSection</code> and <code>referenceSizeForFooterInSection</code> method.</p>
  
  <p>I have registered the NIB too. </p>
  
  <pre><code>collectionView.register(UINib(nibName: "FooterCollectionReusableView", bundle: nil), forSupplementaryViewOfKind: UICollectionElementKindSectionFooter, withReuseIdentifier: "footerIdentifier");
  collectionView.register(UINib(nibName: "HeaderCollectionReusableView", bundle: nil), forSupplementaryViewOfKind: UICollectionElementKindSectionHeader, withReuseIdentifier: "headerIdentifier");
  </code></pre>
  
  <p>Here is the code that is not working.</p>
  
  <pre><code>func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -&gt; UICollectionReusableView {
  
      var view: UICollectionReusableView! = UICollectionReusableView();
      switch kind {
      case UICollectionElementKindSectionHeader:
          print("HEADER DETECTED");//CALLED
          break;
      case UICollectionElementKindSectionFooter:
          print("FOOTER DETECTED");//NEVER CALLED
          break;
      default:
          break;
      }
  
      return view;
  }
  </code></pre>
  
  <p>Can anyone help me please?</p>
  
  <p>P.S.: I have read some people said that setting the <code>footerReferenceSize</code> in the <code>collectionView</code>'s layout would work, but I tried and it does not work either</p>