DIfferent Scroll direction for multiple sections of Collectionview in swift 2

风流意气都作罢 提交于 2019-12-23 14:01:48

问题


I have an app with UICollectionView with 2 sections.My requirement is to have the first section should scroll in horizontal direction with one row only, while the second should scroll in vertical direction.I am working with Swift 2.1.

Please advice some solutions.


回答1:


Your UICollectionView with 2 sections

Section 1: have only one UICollectionViewCell will contain a UICollectionView(horizontal direction) defined by its datasource.

Section 2: your current datasource.

You can check this one:

UICollectionView within a UICollectionViewCell (Swift)



来源:https://stackoverflow.com/questions/35622322/different-scroll-direction-for-multiple-sections-of-collectionview-in-swift-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!