title: Change height of the UICollectionView section header
body: <p>This is the method I used to adjust the height of the section header of the <code>UICollectionView</code>:</p>
  
  <pre><code>func collectionView(collectionView: UICollectionView!, layout collectionViewLayout: UICollectionViewLayout!, referenceSizeForHeaderInSection section: Int) -&gt; CGSize  {
  
          // ... calculate the height
          return headerSize 
      }
  </code></pre>
  
  <p>It only works for the first time in iOS 7. But always work for iOS 8. For example, the size is CGSize(320,50) the first time, and it will be <code>CGSize(320,80)</code> after a while.But it always be <code>CGSize(320,50)</code> in iOS 7 no matter what the size the method returned. And it's fine in iOS 8, it's changed to <code>CGSize(320,80)</code> finally.</p>
  
  <p>Anybody know the reason? Thanks</p>