简体   繁体   中英

One Horizontal and one vertical UICollectionView placed within a UIScrollView iOS Swift

I have two collection views within a scrollview. The above collectionview is a horizontal collectionview and the bottom one is a vertical. I am fetching all the data from api. And when I'm reaching at the bottom of the vertical collection view I need to hit a new api to fetch the new data. I am able to do that with the method willDisplayCell, but with that the problem I'm facing is UIScrollView. I can't scroll properly on my device. The bottom UICollectionView can not be scrolled smoothly. Can anyone suggest me something? Thank you

Do not put your collectionView in scrollView. Instead of doing so, put your horizontal collectionView as headerView in vertical collectionView.

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