UICollectionViewCell is hidden, although I never hid it

I am very amazed at the result that I get from these lines:

[cell setHidden:NO];
NSLog(@"CELL = %@", cell);
NSLog(@"HIDDEN = %hhd", cell.hidden);

Conclusion:

2015-06-13 19:35:53.923 CELL = <DetailedSqeedCollectionViewCell: 0x145660b0; baseClass = UICollectionViewCell; frame = (-20 -49; 0 0); clipsToBounds = YES; hidden = YES; opaque = NO; layer = <CALayer: 0x1582cd90>>
2015-06-13 19:35:53.923 HIDDEN = 1

How is this possible, does anyone know?

Thanks in advance.

+4
source share
1 answer

I had this problem. iOS is smart enough to hide cells if the basic sub, in my case, the imageView frame is outside the borders and not showing. Make sure you have any subheadings.

You will also find that if you set the background cell color to something that does not match the uicollectionview request, it will no longer be displayed.

+2
source

All Articles