简体   繁体   中英

Vertical scrolling in a master view that contains UICollectionView and UIImageView

I currently have a view set up in Storyboard comprised of an UIImageView on top and a UICollectionView . The UIImageView has a fixed height, while the UICollectionView has a variable height depending on the number of cells associated with it.

在此输入图像描述

What I am trying to figure out is how to set up the scrolling so that the entire master view could scroll vertically, meaning that the UIImageView would not stay locked on the top, and that when I scroll past a certain height in the UICollectionView it could then perform some action such as downloading more items to placed into additional cells?

Thanks!

I think your focus is on header view of collection view.

Refer to this for complete understanding:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM