0
votes

Consider the following:

I have a UICollectionView with a size of 400x400. This UICollectionView has 5 UICollectionViewCells which also have a size of 400x400.

Clip to bounds is set to false so that my UICollectionViewCells will be visible (this does not work, I can only see 1). I want this so I can use paging. When I start scrolling there are 2 cells, but when the scrolling snaps, the previous cell disappears and I can only see 1 cell.

I use dequeueReusableCellWithReuseIdentifier to retrieve cells to fill the collectionview. Can this be part of the problem?

How can I display the UICollectViewCells that are out of the collection view's frame?

1

1 Answers

1
votes

You can't. What you describe for a problem is actually a feature of UICollectionView and UITableView. They reuse the cells that are not visible for performance and memory reasons. You might think of another approach like UICollectionView with custom layout if that would be possible for your requirement or directly use UIScrollView with paging and you rearrange all the views while is scrolling.