DraggableCollectionView icon indicating copy to clipboard operation
DraggableCollectionView copied to clipboard

Mock cell generated in long press event can not support custom UICollectionView class.

Open simplelife-patrick opened this issue 11 years ago • 0 comments

Below codes part is form the hanleLongPressGesture: methods in LSCollectionViewHelper.m file:

        // Create mock cell to drag around
        UICollectionViewCell *cell = [self.collectionView cellForItemAtIndexPath:indexPath];
        cell.highlighted = NO;
        [mockCell removeFromSuperview];
        mockCell = [[UIImageView alloc] initWithFrame:cell.frame];
        mockCell.image = [self imageFromCell:cell];
        mockCenter = mockCell.center;
        [self.collectionView addSubview:mockCell];
        [UIView
         animateWithDuration:0.3
         animations:^{
             mockCell.transform = CGAffineTransformMakeScale(1.1f, 1.1f);
         }
         completion:nil];

If I use a custom UICollectionView class, how can I make the same effect in demo app(like UICollectionViewCell object turns dark once be long pressed, and turns bigger(110%) than original size during the drag operation? (By testing custom cell can't have the same effect)

Thanks.

simplelife-patrick avatar Sep 12 '13 15:09 simplelife-patrick