Closed unixpaul closed 10 years ago
Like 236 is actually redundant. At that point it should be nil. It's there to ensure that if mockCell wasn't removed previously that it is removed (and released) before overwriting the reference with a new one.
You wouldn't do [cell removeFromSuperview] because the cell's lifecycle is managed by the UICollectionView. The LSCollectionViewLayoutHelper is actually what causes the cell to be hidden (not removed).
Thanks Luke. Yes, I figured that out after I posted.
Hello,
I'm just playing around with this and noticed what I think is an typo on line 236 of LSCollectionViewHelper.m . This is where the mockcell is created after the long press. Should line 236 not be
[cell removeFromSuperview]
instead of[mockCell removeFromSuperview]
since mockCell does not yet exist ?