title: UICollectionViewCell selection behavior
body: <p>I have a photo gallery in my app. where i can select multiple photos and can delete them. All is going on very well. </p>
  
  <p>I just need to implement apple's default selection behavior as we can see in camera roll.</p>
  
  <p><img src="https://i.stack.imgur.com/HHmFY.png" alt="enter image description here"></p>
  
  <p>Right now my selection is like this </p>
  
  <p><img src="https://i.stack.imgur.com/bPnww.png" alt="enter image description here"></p>
  
  <p>I have implemented didSelectItemAtIndexPath method as follows - </p>
  
  <pre><code>- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath
  {
      NSLog(@"Delegate cell %@ : SELECTED", [self formatIndexPath:indexPath]);
      MyCustomCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellIdentifier forIndexPath:indexPath];
      cell.label.backgroundColor=[UIColor greenColor];
  }
  
   - (NSString *)formatIndexPath:(NSIndexPath *)indexPath 
  {
      return [NSString stringWithFormat:@"%ld", (long)indexPath.row+1];
  }
  </code></pre>
  
  <p>And In MyCustomCell.m, I set the frame of label as rectangle as shown in fig (green).</p>
  
  <p>And method setSelected looks like following:</p>
  
  <pre><code>- (void)setSelected:(BOOL)selected
  {
      UIView *blurView=[[UIView alloc] initWithFrame:CGRectMake(0, 0, 60, 70)];
      blurView.backgroundColor=[UIColor whiteColor];
      blurView.alpha=0.5;
      blurView.opaque=YES;
      if (selected) {
          self.label.backgroundColor = [UIColor greenColor];
          [self.imageThumb addSubview:blurView];
      }
  }
  </code></pre>
  
  <p>So, Is it possible to have apple's default selection behavior ??</p>
  
  <p>Any help will be appreciated. Thanks in advance.</p>