title: Why I cannot use the referenceSizeForFooterInSection from UICollectionViewFlowLayout with EstimateItemSize?
body: <p>I'm trying to make a collectionView with self-sizing and infinity scroll, but when I set the <code>referenceSizeForFooterInSection</code> method my cells are not shown. </p>
  
  <p>When I remove the estimateItemSize property and set the ItemSize property, the cells are shown.</p>
  
  <p>What is wrong in my code?</p>
  
  <p><strong>My vc:</strong></p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
  
      // Set explorerTableView
      setupExplorerCollectionView()
  
      // load presenter viewDidLoad
      presenter.viewDidLoad()
  }
  
  
  func setupExplorerCollectionView() {
      // Set flow layout
      if let flowLayout = explorerCollectionView.collectionViewLayout as? UICollectionViewFlowLayout {
          flowLayout.estimatedItemSize   = CGSize(width: self.view.frame.width, height: 398)
          flowLayout.minimumLineSpacing  = 0
          flowLayout.scrollDirection     = .vertical
      }
  
  
      // Set delegate &amp; dataSource
      explorerCollectionView.dataSource = self
      explorerCollectionView.delegate   = self
  
      // Register cells
      explorerCollectionView.register(ExplorerCell.self)
      explorerCollectionView.registerView(LoadingCell.self, for: UICollectionElementKindSectionFooter)
  }
  
  extension ExplorerViewController: ExplorerView {
  
  func loadExplorerData(_ stories: [Story]) {
      self.stories.append(contentsOf: stories)
      self.explorerCollectionView.reloadData()
  }
  
  func showNoContentView() {
      //
  }
  
  extension ExplorerViewController: UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout {
  
  func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
      return stories.count
  }
  
  func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
      if indexPath.item == stories.count - 1 {
          if loadMore == .haveMore {
  
          }
      }
  
      let cell = collectionView.dequeueReusableCell(for: indexPath) as ExplorerCell
      cell.setup(with: stories[indexPath.item])
      return cell
  }
  
  func collectionView(_ collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, at indexPath: IndexPath) -&gt; UICollectionReusableView {
      var footer: LoadingCell!
  
      if (kind ==  UICollectionElementKindSectionFooter) &amp;&amp; (loadMore != .finished){
          footer = collectionView.dequeueReusableView(of: kind, for: indexPath) as LoadingCell
          footer.setup()
      }
  
      return footer
  }
  
  func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, referenceSizeForFooterInSection section: Int) -&gt; CGSize {
      return (loadMore == .finished) ? CGSize.zero : CGSize(width: self.view.frame.width, height: 50)
  }
  }
  </code></pre>
  
  <p>Thanks.</p>