Exchange position of cells by gesture
问题 I have UICollectionView in which I have a prototype cell and UIImageView in it.I am displaying random images in UICollectionView . Now I want to exchange position of UIImageView by swiping it to near cell.I have tried swipe gesture and long press gesture.Code is given below which I have done: - (IBAction)LongPress:(UILongPressGestureRecognizer *)sender { if (sender.state != UIGestureRecognizerStateEnded) { return; } CGPoint p = [sender locationInView:self.collectionView]; NSIndexPath