title: How do I pass a value to a custom UICollectionViewCell?
body: <p>I have a custom UICollectionViewCell that I am attempting to pass a value to from my view controller. I'm able to pass an image to the cell, but anything else comes up nil upon initialization.</p>
  
  <p>Relevant code in the View Controller:</p>
  
  <pre><code>override func viewDidLoad() {
  
      self.collectionView!.registerClass(MyCustomCell.self, forCellWithReuseIdentifier: "Cell")
  
  }
  
  func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
  
      let cell = collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath) as! MyCustomCell
  
      cell.someValue = 5
      cell.imageView.image = UIImage(named: "placeholder.png")
  
      return cell
  
  }
  </code></pre>
  
  <p>In the custom cell class:</p>
  
  <pre><code>var someValue: Int!
  var imageView: UIImageView!
  
  override init(frame: CGRect) {
  
      super.init(frame: frame)
  
      imageView = UIImageView(frame: CGRectMake(0, 0, frame.width, frame.height))
      contentView.addSubview(imageView)
  
      let someValueLabel = UILabel()
      someValueLabel.frame = CGRectMake(0, 75, 200, 30)
      someValueLabel.text = "Value is: \(someValue)"
      self.addSubview(someValueLabel)
  }
  </code></pre>
  
  <p>The image is successfully passed from the UICollectionView and I am able to display it, but 'someValue' is always nil. </p>
  
  <p>What am I doing wrong?</p>