title: How to get the selected CollectionViewCell in the UICollectionView?
body: <p>I am new for IOS development , and I try to use <code>UIcollectionView</code> to show the photo without using <code>storyboard</code>.</p>
  
  <p>I create a <code>xib file</code> call <code>AITFileCell_grid.xib</code> , and add a <code>Collection View Cell</code>.</p>
  
  <p>I also create another <code>xib file</code> and add the <code>Collection View</code> for loading <code>Collection View Cell</code>.</p>
  
  <p>I want to selected multiple file and delete them by <code>delete button</code>.</p>
  
  <p>But I can not get the cell when I click the <code>delete button</code> by following code.</p>
  
  <pre><code>if(self.collectionView.indexPathsForSelectedItems &gt; 0){
          NSLog(@"indexPathsForSelectedItems...count.%@..@@@" , self.collectionView.indexPathsForSelectedItems);
  
  
          for(NSIndexPath *indexPath in self.collectionView.indexPathsForSelectedItems){
  
  //            [self.collectionView deselectItemAtIndexPath:indexPath animated:NO];
              NSString *filePath = [NSString stringWithFormat:@"%@/%@", directory, [fileList objectAtIndex:indexPath.row]];
              [[NSFileManager defaultManager] removeItemAtPath:filePath error:nil] ;
              AITFileCell_grid *cell = [self.collectionView dequeueReusableCellWithReuseIdentifier:@"AITFileCell_grid" forIndexPath:indexPath];
          }
      }
  </code></pre>
  
  <p>But the sell seems not correct...</p>
  
  <p><strong>How to get the <code>selected cell</code> in <code>collectionView</code></strong> ?</p>