title: UICollectionView 3 column grid, 1px space?? (image included)
body: <p>I have setup a UICollectionView with a FlowLayout that leaves no space in between cells in either the vertical or horizontal directions.</p>
  
  <p>I have everything working, yet there is an odd 1px space between the 2nd and 3rd column and I have no idea why!? I have verified the 1px gap shows up both in iOS simulator and on a real device. Has anybody experienced this? </p>
  
  <p>My UIViewController is a delegate/datasource of the following:</p>
  
  <p><code>class MyViewController: UIViewController, UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout</code></p>
  
  <p>I have implemented the necessary functions to remove any spacing (and verified with print statements that they are running), as well as visual confirmation of the cells lining up next to each other:</p>
  
  <pre><code>func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAtIndex section: Int) -&gt; UIEdgeInsets {
      return UIEdgeInsetsZero
  }
  
  func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumInteritemSpacingForSectionAtIndex section: Int) -&gt; CGFloat {
      return 0
  }
  
  func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, minimumLineSpacingForSectionAtIndex section: Int) -&gt; CGFloat {
      return 0
  }
  </code></pre>
  
  <p>Finally, I have printed out the width of the cell being returned (each color square) to verify it was the <code>(view.frame.width / 3)</code> or <code>(320/3)</code>, which is 106.666667</p>
  
  <pre><code>func collectionView(collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -&gt; CGSize {
  
      var totalHeight: CGFloat = (self.view.frame.width / 3)
      var totalWidth: CGFloat = (self.view.frame.width / 3)
  
      println(totalWidth) // this prints 106.666666667
  
      return CGSizeMake(totalWidth, totalHeight)
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/jvZwl.png" alt="enter image description here"></p>