F.SO4 F.SO4 - 1 year ago 131
Swift Question

UICollectionView scroll whole page

I have a viewController with some text and under it a

(about 50% of the page).

My problem is that when I scroll on the collectionView just the cells are being scrolled and not the whole page (the text + the collection cells).

you can think about it like on Instagram profile page (half info half collcetionView), when you scroll on Instagram everything is being scrolled and not just the colleciton cells.

Anyone knows how can I do it?


kye kye
Answer Source

Thats because your text/UILabels doesn't belong within the UIScrollView of your UICollectionView, thus it will not be scrolled when the collectionView is. You could create a UICollectionViewCell for your text, include it within your collectionview and expand the collectionView to fit the screen or use a UICollectionViewController

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download