Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

After reloadData when no dataSource is empty (0 items) two cells are shown #176

Closed
SergeyAniskin opened this Issue Jan 12, 2013 · 0 comments

Comments

Projects
None yet
1 participant

The problem is in cached cells. I added this code to the end of cleanupUnseenItems seems it solves the problem

if (_numberTotalItems == 0)
{
[self.itemSubviewsCache enumerateObjectsUsingBlock:^(id obj, NSUInteger index, BOOL *stop)
{
if ([obj isKindOfClass:[GMGridViewCell class]])
{
[(UIView *)obj removeFromSuperview];
}
}];
self.itemSubviewsCache = [NSArray array];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment