Browse files

Merge pull request #2 from berzniz/master

Unused cells show up unexpectedly
  • Loading branch information...
2 parents 0cfda25 + 23eecfd commit 7b2d2f306a2bcddf1f9e565ecf6ffabb9f82addd @messi messi committed Jul 31, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 NGVaryingGridView/NGVaryingGridView/NGVaryingGridView.m
View
1 NGVaryingGridView/NGVaryingGridView/NGVaryingGridView.m
@@ -197,6 +197,7 @@ - (void)loadCellsInRect:(CGRect)rect {
// Move unused Cells to reusableCells
NSMutableDictionary *unusedCells = [NSMutableDictionary dictionaryWithDictionary:self.gridCells];
[unusedCells removeObjectsForKeys:usedCells.allKeys];
+ [unusedCells.allValues makeObjectsPerformSelector:@selector(removeFromSuperview)];
[self.gridCells removeObjectsForKeys:unusedCells.allKeys];
[self.reuseableCells addObjectsFromArray:unusedCells.allValues];

0 comments on commit 7b2d2f3

Please sign in to comment.