Swift 2的Collectionview的多个部分的不同滚动方向 [英] DIfferent Scroll direction for multiple sections of Collectionview in swift 2

查看:374
本文介绍了Swift 2的Collectionview的多个部分的不同滚动方向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有UICollectionView的应用程序,该应用程序有2个部分.我的要求是让第一部分仅在水平方向上滚动一行,而第二部分应在垂直方向上滚动.我正在使用Swift 2.1./p>

请提出一些解决方案.

解决方案

具有2个部分的 UICollectionView

第1节:只有一个 UICollectionViewCell 将包含由其数据源定义的 UICollectionView (水平方向).

第2部分:您当前的数据源.

您可以检查以下一项:

UICollectionViewCell(Swift)中的UICollectionView

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.

解决方案

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)

这篇关于Swift 2的Collectionview的多个部分的不同滚动方向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆