After reloadData when no dataSource is empty (0 items) two cells are shown
sergianiskin opened this issue · 0 comments
sergianiskin commented
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];
}