Skip to content
This repository has been archived by the owner on Oct 31, 2019. It is now read-only.

Customizing cell sizes would crash the dragging #40

Open
johnqh opened this issue May 22, 2014 · 2 comments
Open

Customizing cell sizes would crash the dragging #40

johnqh opened this issue May 22, 2014 · 2 comments

Comments

@johnqh
Copy link

johnqh commented May 22, 2014

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.

@JaredPoetter
Copy link

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.

@bartoszhernas
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants