title: Unable to rearrange the cells in UICollectionView by moving them?
body: <p>I have UICollectionView on which i am displaying the <strong>custom</strong> cells.I am trying to move the cells by making long press gesture but it does not work at all.</p>
  
  <p>I have followed <a href="http://nshint.io/blog/2015/07/16/uicollectionviews-now-have-easy-reordering/" rel="nofollow">this</a> tutorial but it does not working for me.Please tell how to do this?</p>
  
  <p><strong>Long Press gesture</strong></p>
  
  <pre><code>-(void)handleLongPress:(UILongPressGestureRecognizer *)gestureRecognizer
  {
  
      NSLog(@"long press geture called");
      switch(gestureRecognizer.state)
      {
          case UIGestureRecognizerStateBegan:
              p = [gestureRecognizer locationInView:self.collection_view];
            gesture_indexPath = [self.collection_view indexPathForItemAtPoint:p];
          [self.collection_view beginInteractiveMovementForItemAtIndexPath:gesture_indexPath];
              NSLog(@"state began called");
  
                       break;
  
          case UIGestureRecognizerStateChanged:
  
          //    collectionView.updateInteractiveMovementTargetPosition(gesture.locationInView(gesture.view!))
              [self.collection_view updateInteractiveMovementTargetPosition:[gestureRecognizer locationInView:[gestureRecognizer view]]];
              NSLog(@"state changed called");
          case UIGestureRecognizerStateEnded:
              [self.collection_view updateInteractiveMovementTargetPosition:p];
                    NSLog(@"state changed called");
          default:
              [self.collection_view cancelInteractiveMovement];
      }
  }
  </code></pre>
  
  <p><strong>Method Overidden</strong></p>
  
  <pre><code>-(void)collectionView:(UICollectionView *)collectionView moveItemAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)destinationIndexPath
  {
      NSLog(@"Move at index path called");
  }
  </code></pre>