Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug fix: Unused cells are not removed from the scrollview and may app…

…ear unexpectedly
  • Loading branch information...
commit 23eecfd2cbb12e63a3a5a48d65fd0e0de19e08dc 1 parent 0cfda25
Tal Bereznitskey berzniz authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  NGVaryingGridView/NGVaryingGridView/NGVaryingGridView.m
1  NGVaryingGridView/NGVaryingGridView/NGVaryingGridView.m
View
@@ -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];
Please sign in to comment.
Something went wrong with that request. Please try again.