DraggableCollectionView icon indicating copy to clipboard operation
DraggableCollectionView copied to clipboard

Customizing cell sizes would crash the dragging

Open johnqh opened this issue 11 years ago • 2 comments

Simple to reproduce.

In the demo app, in ViewController.m, add the following method:

  • (CGSize)collectionView:(UICollectionView )collectionView layout:(UICollectionViewLayout)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { return CGSizeMake(indexPath.row == 0 ? 200 : 100, 100); }

See screenshot for the layout:

ios simulator screen shot may 22 2014 3 28 12 pm

Trying to drag any cell would crash with an exception.

johnqh avatar May 22 '14 22:05 johnqh

I am doing the same sort of thing with each cell having a different size. So I am wondering if this is not an issue with the DraggableCollectionView.

What kind of exception are you getting? Because I am getting one about the index is out of bounds because something is trying to access the count of the array which would be one more than is present. It is doing that for any of the cells in the collectionview.

JaredPoetter avatar Oct 07 '14 20:10 JaredPoetter

Anyone tried to solve this issue? I am having the same problems

bartoszhernas avatar Feb 12 '15 16:02 bartoszhernas