title: How to center align the cells of a UICollectionView?
body: <p>I am currently using <code>UICollectionView</code> for the user interface grid, and it works fine. However, I'd like to be enable horizontal scrolling. The grid supports 8 items per page and when the total number of items are, say 4, this is how the items should be arranged with horizontal scroll direction enabled:</p>
  
  <pre><code>0 0 x x
  0 0 x x
  </code></pre>
  
  <p>Here 0 -> Collection Item 
  and x -> Empty Cells</p>
  
  <p>Is there a way to make them center aligned like:</p>
  
  <pre><code>x 0 0 x
  x 0 0 x
  </code></pre>
  
  <p>So that the content looks more clean?</p>
  
  <p>Also the below arrangement might also be a solution I am expecting.</p>
  
  <pre><code>0 0 0 0
  x x x x
  </code></pre>