title: Section Insets not respected when rendering the cells of UICollectionView
body: <p><a href="https://i.stack.imgur.com/WWhzK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WWhzK.png" alt=""></a></p>
  
  <p>I have a UICollectionView containing two sections. 
  I have given section insets of left = 5 and right = 5 from storyboard. 
  I am using the same .xib for cells of both the sections. 
  I am inputting the size of the cells in <code>sizeForItemAtIndexPath</code></p>
  
  <pre><code>    func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -&gt; CGSize {
  
          let itemWidth = self.collectionViewTrending.bounds.size.width - 10
          if(indexPath.section == 0) {
  
                  return CGSizeMake(itemWidth , 200)
  
          } else {
  
              let product = self.products.objectAtIndex(indexPath.row) as! Product
              let imageHeight = CGFloat(product.imageHeight)
              return CGSizeMake(itemWidth, imageHeight * 0.81)
          }
  
  
  
     }
  </code></pre>
  
  <p>The problem is this : </p>
  
  <p>For Section 0, the cell is centered and section insets are respected.</p>
  
  <p>For Section 1, the left section inset is respected but the right isn't and all the cells of section 1 have their right edges touching the right edge of collectionView. </p>
  
  <p>Why is this happening and how can I resolve it?</p>