简体   繁体   English

UITableView里面的UICollectionView

[英]UITableView Inside a UICollectionView

如何在collectionView内设置多个表视图数据?

I think its too complex to add multiple table views inside one UICollectionViewCell. 我认为它太复杂了,无法在一个UICollectionViewCell中添加多个表视图。 Embedded scroll views is not recommended in terms of UX. 不建议在UX方面使用嵌入式滚动视图。

But you can do it by subclassing The UICollectionViewCell and be the delegate/datasources of table views. 但是您可以通过对UICollectionViewCell进行子类化来做到这一点,并成为表视图的委托/数据源。

You can use only one table with multiple sections instead of multiple tables. 您只能使用一个包含多个节的表,而不能使用多个表。

You can achieve this by giving tag to each UITableView in all the UICollectionViewCells and you have to manage all UITableViewDataSource and UITableViewDelegate methods by tags of particular tableView. 您可以通过为所有UICollectionViewCells每个UITableView提供标签来实现此UICollectionViewCells并且您必须通过特定tableView的标签来管理所有UITableViewDataSourceUITableViewDelegate方法。

I know its complicated but you can try this out. 我知道它很复杂,但是您可以尝试一下。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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