title: How to use UICollectionViewDelegateFlowLayout?
body: <p>This is the first time I use UICollectionView and it is quite interesting, but I hit the following problem. Can anyone help me clarify what is happening ?</p>
  
  <p>With the following code:</p>
  
  <pre><code>- (CGSize)collectionView:(UICollectionView *)collectionView
                    layout:(UICollectionViewLayout*)collectionViewLayout
    sizeForItemAtIndexPath:(NSIndexPath *)indexPath
  {
      return CGSizeMake(280.0,36.0);
  }
  </code></pre>
  
  <p>I have this display:</p>
  
  <p><img src="https://i.stack.imgur.com/WDc83.png" alt="enter image description here"></p>
  
  <p>Obviously I need a higher space to display the cell reading "Nous sommes" because it has a second line now invisible.
  Since this is the fifth line I use the following code (expecting to solve the problem):</p>
  
  <pre><code>- (CGSize)collectionView:(UICollectionView *)collectionView
                    layout:(UICollectionViewLayout*)collectionViewLayout
    sizeForItemAtIndexPath:(NSIndexPath *)indexPath
  {
      return CGSizeMake(280.0,indexPath.row!=4?36.0:72.0);
  }
  </code></pre>
  
  <p>But here is the result:</p>
  
  <p><img src="https://i.stack.imgur.com/neC0r.png" alt="enter image description here"></p>
  
  <p>Returning a size with a larger height causes the cell to extent horizontally (which I do not want) while still giving the space (vertically) without using it.
  I am missing something. Please explain if you can.</p>