title: How to get 1 pixel width borders in UICollectionView cells? (code provided)
body: <p>How can I get a pixel perfect one (1) pixel with border line in a UICollectionView (e.g. to make a month calendar).  The issue is that where cells meet, their borders meet, so it is effectively 2 pixels (not 1 pixel).  </p>
  
  <p>Therefore this is a CollectionView layout related issue/question.  As the way each cell puts it own 1 pixel border gives rise, when the cells all meet up with zero spacing, to what looks like a 2 pixels border overall (except for outer edges of the collectionView which would be 1 pixel)</p>
  
  <p>Seeking what approach/code to use to solve this.  </p>
  
  <p>Here is the custom UICollectionViewCell class I use, and I put borders on the cells in here using drawrect.</p>
  
  <pre><code>import UIKit
  
  class GCCalendarCell: UICollectionViewCell {
  
      @IBOutlet weak var title : UITextField!
  
      required init?(coder aDecoder: NSCoder) {
          super.init(coder: aDecoder)
      }
  
      override init(frame: CGRect) {
          super.init(frame: frame)
      }
  
      override func drawRect(rect: CGRect) {
          self.layer.borderWidth = 1
          self.layer.borderColor = UIColor.redColor().CGColor
      }
  
  }
  </code></pre>