Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UICollectionView cell disappears

I am using collectionView in my iPad application. I have used custom layout class which inherited UICollectionViewFlowLayout class.

I am using horizontal scroll directional. The problem is, whenever we use scroll for collection view, some times cell get disappear. I debugged the code, and found that in data source method after creating cell, its hidden property get automatically ON.

I tried using below line but its not working

   cell.hidden = NO  

I have below method also to invalidate layout on bound change.

    - (BOOL)shouldInvalidateLayoutForBoundsChange:(CGRect)newBounds {
          return YES;
        }

But still I am facing problem. Any solution on this ?

Thanks in advance.

like image 338
Swapnil Avatar asked Mar 09 '13 12:03

Swapnil


People also ask

What is a UICollectionView?

An object that manages an ordered collection of data items and presents them using customizable layouts.


1 Answers

There is a known issue which may cause cells to disappear in UICollectionView. If their fix doesn't work for you, try PSTCollectionView, which is an open source replacement for UICollectionView. If PSTCollectionView works, you should file a radar ticket to Apple.

like image 126
Hai Feng Kao Avatar answered Oct 04 '22 21:10

Hai Feng Kao