title: UICollectionView Magic Selection
body: <p>I added collection view and add selection events:</p>
  
  <pre><code>private func addFriendCollectionView() {
      let layout: UICollectionViewFlowLayout = UICollectionViewFlowLayout()
  
      let cellSize = (mainContainerView?.frame.width)! / 4
  
      layout.sectionInset = UIEdgeInsets(top: 10, left: 10, bottom: 50, right: 10)
  
      layout.itemSize = CGSize(width: cellSize, height: cellSize)
      layout.minimumLineSpacing = 50.00
  
      let positionRectangle = CGRect(x: 5, y: 230, width: (mainContainerView?.frame.width)!, height: 300)
  
      friendsCollection = UICollectionView(frame: positionRectangle, collectionViewLayout: layout)
      friendsCollection?.registerClass(FriendCollectionViewCell.self, forCellWithReuseIdentifier: "friendCell")
      friendsCollection?.backgroundColor = UIColor.whiteColor()
  
      friendsCollection!.layer.borderColor = UIColor.grayColor().CGColor
      friendsCollection!.layer.borderWidth = 0.5
  
      friendsCollection?.tag = 1
      friendsCollection?.allowsMultipleSelection = true
  
      friendsCollection?.dataSource = self
      friendsCollection?.delegate = self
  
      self.view.addSubview(friendsCollection!)
  }
  
  func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
      if collectionView.tag == 1 {
  
          let cell = collectionView.cellForItemAtIndexPath(indexPath) as! FriendCollectionViewCell
  
          selectedFriends[indexPath] = cell.friendName.text
  
          cell.selectBlackView.hidden = false
          cell.selectedImage.hidden = false
  
  
  
          print("\(selectedFriends.count) - \(indexPath)")
  
      } else if collectionView.tag == 2 {
          let cell = collectionView.cellForItemAtIndexPath(indexPath) as! DateSelectionCollectionViewCell
  
          print("\(cell.weekday.text) and \(indexPath)")
      }
  }
  </code></pre>
  
  <p>But selection layer add every cell with offset 9. If i am select 1 selected 10, 19, 28... etc but indexPath change correct</p>