title: SelectItem in UICollectionView on first Load
body: <p>I have a UICollectionView and there user can select on cell to use the Function in it. So and i need it to set the first cell to selected like in the First Screenshot. But the Problem there is when the cell is selected and user want to select ah other cell the first cell don´t unselect. I have try it to reload the tableview in did select item but that don´t run or with this func in viewdidload <code>LabelCollectionView.selectItem(at: IndexPath(row: 1, section: 0), animated: true, scrollPosition: .bottom)
  </code></p>
  
  <p>Have anyone an idea what i can make there ? thanks for Help:) </p>
  
  <p><a href="http://i.stack.imgur.com/82vao.png" rel="nofollow">First Cell Selected</a></p>
  
  <p><a href="http://i.stack.imgur.com/OM7jP.png" rel="nofollow">Here you see the Problem in the screenshot</a></p>
  
  <pre><code>func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell {
      let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "StoryLabelCell", for: indexPath) as! StoryLabelCell
  
  
      let labels = Labels[indexPath.row]
  
  
      cell.backgroundColor = UIColor.lightGray
      cell.layer.cornerRadius = 10
  
      cell.Title.text = labels
  
  
  
      if indexPath.row == 0 {
          cell.backgroundColor = darkgrau
          cell.layer.borderColor = black.cgColor
          cell.layer.borderWidth = 2.0
      }
  
  
      return cell
  
  }
  
  
  
  func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
      let cell = collectionView.cellForItem(at: indexPath) as! StoryLabelCell
  
  
      if indexPath.row == indexPath.row {
          cell.backgroundColor = darkgrau
          cell.layer.borderColor = black.cgColor
          cell.layer.borderWidth = 2.0
      }
  
  }
  
  
  
  
  func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) {
      let cell = collectionView.cellForItem(at: indexPath) as! StoryLabelCell
  
  
      if indexPath.row == indexPath.row {
  
          cell.backgroundColor = lightGray
          cell.layer.borderWidth = 0
      }
  
  }
  </code></pre>