【发布时间】:2016-06-29 07:41:27
【问题描述】:
我在 UICollectionViewCell 内的 UITableView 中设置我的 json 数据
但我得到的数据是
----------- ----------- ----------
| Data 1 | | Data 2 | | Data 3 |
| | | | | |
----------- ----------- ----------
----------- ----------- ----------
| Data 4 | | Data 5 | | Data 6 |
| | | | | |
----------- ----------- ----------
但我希望我的数据这样显示(表示垂直)-
----------- ----------- ----------
| Data 1 | | Data 3 | | Data 5 |
| | | | | |
----------- ----------- ----------
----------- ----------- ----------
| Data 2 | | Data 4 | | Data 6 |
| | | | | |
----------- ----------- ----------
我将每个 Indexpath.row 中的数据数组从 CollectionView cellForRowAtIndexPath 传递到 TableView cellForRowAtIndexPath
在TableView cellForRowAtIndexPath,我正在打印我在上面提取到每个 Indexpath.row 的数据。
【问题讨论】:
-
集合是否只有 4 个单元格?
-
不,CollectionView 有 28 个单元格(作为 4 行和 7 列),就像一个 TIMETABLE。 @BharatModi
-
你能不能展示一些图片,你需要做什么?正如您所说,您的 collectionView 单元格具有 tableView,知道您到底想要做什么有点令人困惑?
-
设置
scrollDirection水平 -
通过应用自定义布局?
标签: ios objective-c uitableview uicollectionview nsarray