title: UICollectionView didSelectItemAtIndexPath effects multiple cells - swift
body: <ul>
  <li>Swift, no storyboard, UICollectionView from xib file</li>
  </ul>
  
  <p>I am running very simple code to update cell's background color but, more then one cells are updating.</p>
  
  <pre><code>        override func viewDidLoad(){
      super.viewDidLoad()
      // getting images from library
      images = PHAsset.fetchAssetsWithMediaType(.Image, options: nil)
  
      collectionView.allowsMultipleSelection = false
      var nipName2 = UINib(nibName: "CollectionViewCell", bundle:nil)
      collectionView.registerNib(nipName2, forSupplementaryViewOfKind: UICollectionElementKindSectionHeader, withReuseIdentifier: "HeaderCell")
      var nipName = UINib(nibName: "MyViewCell", bundle:nil)
      collectionView.registerNib(nipName, forCellWithReuseIdentifier: "Cell")
   }
  
   func numberOfSectionsInCollectionView(collectionView: UICollectionView) -&gt; Int {
      return 1
   }
  
   func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -&gt; Int {
      return images.count
   }
  
   func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell{
      var cell = collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath) as! MyViewCell
      cell.frame.size.width = 60
      return cell
   }
  
   func collectionView(collectionView: UICollectionView, viewForSupplementaryElementOfKind kind: String, atIndexPath indexPath: NSIndexPath) -&gt; UICollectionReusableView{
      switch kind
      {
      case UICollectionElementKindSectionHeader:
          let headerView = collectionView.dequeueReusableSupplementaryViewOfKind(kind, withReuseIdentifier: "HeaderCell", forIndexPath: indexPath) as! CollectionViewCell
          return headerView
      default:
          assert(false, "Unexpected element kind")
      }
   }
  
   func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath)
   {
      var cell = collectionView.cellForItemAtIndexPath(indexPath)
      cell?.backgroundColor = UIColor.redColor()
   }
  </code></pre>
  
  <p>I have about 300 different cells. I want to update just third one but randomly many other cells' background changing.</p>