title: UICollectionView how to deselect all
body: <p>I have a FollowVC and FollowCell Setup with collection View. I can display all the datas correctly into my uIcollection view cell  using the following code with no problem.</p>
  
  <pre><code>    func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -&gt; UICollectionViewCell {
  
      if let cell = collectionView.dequeueReusableCellWithReuseIdentifier("FollowCell", forIndexPath: indexPath) as? FollowCell {
  
          let post = posts[indexPath.row]
  
          cell.configureCell(post, img: img)
  
          if cell.selected == true {
              cell.checkImg.hidden = false
          } else {
              cell.checkImg.hidden = true
          }
          return cell
      }
  }
  </code></pre>
  
  <p>Note that I could also select and deselect multiple images using the following code</p>
  
  <pre><code>    func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
  
      if deletePressed == true {
          let cell = collectionView.cellForItemAtIndexPath(indexPath) as! FollowCell
          cell.checkImg.hidden = false
      } else {
          let post = posts[indexPath.row]
          performSegueWithIdentifier(SEGUE_FOLLOW_TO_COMMENTVC, sender: post)
      }
  }
  
  func collectionView(collectionView: UICollectionView, didDeselectItemAtIndexPath indexPath: NSIndexPath) {
      let cell = collectionView.cellForItemAtIndexPath(indexPath) as! FollowCell
      cell.checkImg.hidden = true
  }
  </code></pre>
  
  <p>When In "Select" mode, I can perform the selction of each cell and a check mark will be displayed on the cell. However, what I want to do is to have a cancel buttom to disable all the selected cell and removing the checkImg.</p>
  
  <p>I have tried</p>
  
  <pre><code>    func clearSelection() {
      print("ClearSelection posts.count = \(posts.count)")
  
      for item in 0...posts.count - 1 {
          let indexP = NSIndexPath(forItem: item, inSection: 0)
          followCollectionView.deselectItemAtIndexPath(indexP, animated: true)
          let cell = followCollectionView.cellForItemAtIndexPath(indexP) as! FollowCell
          cell.checkImg.hidden = true
      }
  }
  </code></pre>
  
  <p>The program crashes here giving me a fatal error: Unexpectedly found nil while unwrapping an optional error at</p>
  
  <pre><code>let cell = followCollectionView.cellForItemAtIndexPath(indexP) as! FollowCell
  </code></pre>
  
  <p>I dont know why it is having trouble unwrapping the cell to be my FollowCell which contains an instance of the checkImg. I already used it before in a similar situation in didSelectItemAtIndexPath and it seems to work?</p>
  
  <p>Thanks, </p>