How can I scroll entire window with UIScrollView on top to display a image gallery, and an UICollectionView to show another items? (See the mockup bellow)
I tried this structure but only the collection view scrolls and scrollview stays on the top.
What control should I use to group the scrollview and collectionview to have vertical scrolling on the entire window (and the collection view to grow with it contents)?
[Mockup] http://img835.imageshack.us/img835/3138/prototyperl.png
I would just use a UICollectionView and add the UIView as the header for the first section - and it would properly also be the simplest solution.
If you wrap the UICollectionView in the ScrollView and resizes the UICollectionView to fit content size you will most likely get poor performance, because all cells will be rendered when the view is shown(Not when cells are visible) - missing the point of reusable cells.
Override UICollectionViewDataSource delegate method:
-(UICollectionReusableView *)collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With