title: Swift UICollectionView Cells Mysteriously Repeat
body: <p>We are trying to make a collection view. In each cell the users can choose an image and enter text into a text field. We noticed that after adding four cells, when we add a new cell, the text field is already filled with the information from previous cells. In our code, we never programmatically fill the text field (which starts out empty), we allow the user to do this. Any suggestions?</p>
  
  <pre><code>  func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
  
      let cell = collectionView.dequeueReusableCellWithReuseIdentifier("Image", forIndexPath: indexPath) as! CollectionViewCell
      cell.deleteButton?.addTarget(self, action: #selector(AddNewItem.xButtonPressed(_:)), forControlEvents: UIControlEvents.TouchUpInside)
      cell.deleteButton?.layer.setValue(indexPath.row, forKey: "index")
      let item = items[indexPath.item]
      let path = getDocumentsDirectory().stringByAppendingPathComponent(item.image)
      cell.imageView.image = UIImage(contentsOfFile: path)
      cell.imageView.layer.borderColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.3).CGColor
      cell.imageView.layer.borderWidth = 2
      cell.layer.cornerRadius = 7
  
      return cell
  }
  </code></pre>