title: How to refresh/reload UICollectionView Header to update label showing item count in section
body: <p>I am trying to update UICollectionView headers when entering or deleting an item from a section.</p>
  
  <p>Reloading sections works exactly how I would want it to work, but it affects the animation of removing a cell, which looks terrible.</p>
  
  <p>I also tried invalidating the layout, but that didn't work.</p>
  
  <p>I would like to be able to reload headers after deleting a cell, which I am doing like this:</p>
  
  <pre><code>   func deleteItem(sender: UIButton) {
  
      let point : CGPoint = sender.convert(.zero, to: collectionView)
      let i = collectionView!.indexPathForItem(at: point)
      let index = i
  
      addOneToCompletedCount()
  
      if index?.section == 0 {
  
          GlobalList.priorityArray.remove(at: (index?.item)!)
          self.collectionView?.deleteItems(at: [index!])
          print("deleted priority item")
          collectionView?.collectionViewLayout.invalidateLayout()
          AudioServicesPlaySystemSound(1155)
  
      } else if index?.section == 1 {
  
          GlobalList.listItemArray.remove(at: (index?.item)!)
          self.collectionView?.deleteItems(at: [index!])
          collectionView?.collectionViewLayout.invalidateLayout()
          print("deleted item")
          AudioServicesPlaySystemSound(1155)
  
      } else {
  
          print("Could not delete item")
  
      }
  
      saveData()
      checkIfListEmpty()
  
  }
  </code></pre>
  
  <p>Any ideas? </p>
  
  <p>Thanks!</p>