lxcid / LXReorderableCollectionViewFlowLayout

Extends `UICollectionViewFlowLayout` to support reordering of cells. Similar to long press and pan on books in iBook.
http://lxcid.com/
MIT License
1.86k stars 328 forks source link

App crashing with message sent to dealloc instance #52

Closed pswenson closed 10 years ago

pswenson commented 10 years ago

When I dismiss my modal (storyboard) that has a LXReorderableCollectionViewFlowLayout I get this:

*\ -[CFSet countByEnumeratingWithState:objects:count:]: message sent to deallocated instance 0xb7b66d0 Unfortunately, no stack trace is provided so I can't see the exact line it crashes on.

I tried setting up LXReorderableCollectionViewFlowLayout in code instead of in IB and got the same behavior. When I remove the LXReorderableCollectionViewFlowLayout the modal dismisses fine.

Here is my code:

- (void)viewDidLoad {
    [super viewDidLoad];
    self.assets = [[NSMutableArray alloc] init];
    photoUploadInfoArray = [[NSMutableArray alloc] init];
    LXReorderableCollectionViewFlowLayout *flowLayout = [[LXReorderableCollectionViewFlowLayout alloc] init];
    self.photoCollectionView.collectionViewLayout = flowLayout;
    flowLayout.itemSize = CGSizeMake(100, 100);
    flowLayout.minimumInteritemSpacing = 1;
    [self.photoCollectionView registerClass:[UpdateCollectionViewCell class] forCellWithReuseIdentifier:@"cell"];
}
pswenson commented 10 years ago

ok, this issue goes away with latest code. The pod is not pointing at the latest.... I changed my pod file like so:

pod 'LXReorderableCollectionViewFlowLayout', :git => 'https://github.com/lxcid/LXReorderableCollectionViewFlowLayout'