使用UICollectionViewCell中的UICollectionView [英] Using a UICollectionView from a UICollectionViewCell

查看:83
本文介绍了使用UICollectionViewCell中的UICollectionView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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