I have a UIView in which I am adding a UICollectionView
to act as a banner view to look like a carousel. The Viewcontroller
in which UIView
is present, is part of pageviewcontroller
.
PageVC --> UIViewController
--> UIView
--> UICollectionView
.
Each VC has its own banner, so when the page is swiped, I reload the collectionView
with the respective data and I am able to see it. Now if visit a page which I already visited, the collectionview
cell disappears. The collectionview
is visible but the cell is somehow hidden.
The collectionview
cell is a customcell and I am not using any custom layout, I am using the default flowlayout
. This is working fine in iOS8-devices
.
Below is the debugger output, When cell is visible:
CollectionViewCell: 0x7f9db8d9ffa0; baseClass = UICollectionViewCell; frame = (209 3.5; 209 96); clipsToBounds = YES; opaque = NO; layer = <CALayer: 0x7f9dbb5dde60>>
When invisible (you can see its hidden now) the dequed cell is now hidden, no clue why it is happening
CollectionViewCell: 0x7f9dbb5897e0; baseClass = UICollectionViewCell; frame = (0 3.5; 209 96); clipsToBounds = YES; hidden = YES; opaque = NO; layer = <CALayer: 0x7f9dbb590220>>
indexPathsForVisibleItems is returning nil.