简体   繁体   中英

UITableView inside a Custom UITableViewCell

In my app I have a TableView that displays a list of Items. Tapping on any cell will expand it and will display information related to tapped item. I want to display the information in tabular form, will it be a good approach to have a UITableView inside a UITableViewCell?

我建议您去使用主从视图控制器:),因为您的问题“在UITableViewCell内有一个UITableView”,为此您需要对UITableviewCell进行子类化,并在该单元格中通过管理数据源和委托来放置或添加另一个tableview自定义单元格,请参阅我的答案,它显示了如何在自定义UITableView单元格内添加tableview, 请参见听 ,在此之前,您要增加我未包括的每个单元格的行高,“我创建了所有程序上未使用的xib的东西” :)希望你有所想法。

Have a look to my answer in this post .

I think it is what you are looking for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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