lxcid / LXReorderableCollectionViewFlowLayout

Extends `UICollectionViewFlowLayout` to support reordering of cells. Similar to long press and pan on books in iBook.

Home Page:http://lxcid.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

App crashing with message sent to dealloc instance

pswenson opened this issue · comments

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"];
}

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'