Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from berzniz/master
Browse files Browse the repository at this point in the history
Unused cells show up unexpectedly
  • Loading branch information
messi committed Jul 31, 2012
2 parents 0cfda25 + 23eecfd commit 7b2d2f3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions NGVaryingGridView/NGVaryingGridView/NGVaryingGridView.m
Expand Up @@ -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];
Expand Down

0 comments on commit 7b2d2f3

Please sign in to comment.