问题描述
我有一个自定义UICollectionViewCell,其内容也是一个集合,我想使用UICollectionView来显示其内容.这可能吗?我将如何完成?我使自定义UICollectionViewCell也继承自UICollectionViewDataSource,并定义了UICollectionView内部属性,但是事情没有按预期进行.有什么主意吗?
I have a custom UICollectionViewCell whose content is also a collection and I would like to use UICollectionView to display its content. Is this possible? How would I accomplish this? I made the custom UICollectionViewCell also inheriting from UICollectionViewDataSource and define a UICollectionView internal property but things are not working as expected. Any idea?
推荐答案
这是可能的.通常,您将创建一个用于管理内部集合视图的视图控制器,并将该视图控制器的视图添加到外部集合视图的单元格的内容视图中.
This is possible. Typically you would create a view controller which manages the inner collection view, and add the view of this view controller to the content view of the cell of the outer collection view.
您没有提供任何有关您当前尝试或遇到的问题的描述,因此我不能提供更多的信息.
You haven't given any description of you current attempts or problems encountered, so I can't offer much more than this.
这篇关于使用UICollectionViewCell中的UICollectionView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!