【发布时间】:2018-05-25 21:02:05
【问题描述】:
好的,我看过很多论坛,但没有找到任何具体的问题。
- 我有一个 ViewController,我在其中添加了一个 UITableView。
- UITableView 加载一个作为 xib 文件创建的 UITableViewCell
- TableViewCell 有一个 UITableView,而 UITableView 又创建了一个 UITableViewCell 作为 xib 文件。
-
这是如何在 Firts UITableView 中加载第一个 UITableViewCell。 ViewController 中的负载:
tableDetails.delegate = self tableDetails.dataSource = self tableDetails.register(UITableViewCell.self, forCellReuseIdentifier: "DepartureDetailTableViewCell")
问题是我不知道如何从 ViewController 加载 xib 文件中的 Second UITableView 中的 Second UITableViewCell。有什么帮助吗?此外,如何为第二个 UITableView/UITableViewCell 执行此操作。
PD.:看这个教程,但他在 ViewController 中使用原型单元:https://www.youtube.com/watch?v=znGd5kyIdgM
请帮忙!
更新:
好的,我用@Abdelahad Darwish 解决方案解决了这个问题!但我还有另一个问题...在 DepartureDetailTableViewCell 中加载 DepartureInsideTableViewCell 时...不显示任何内容...它显示如下:
必须在两个视图“May 30, 2018 - 01:04”和“May 30, 07:47”中间显示 DepartureInsideTableViewCell
有什么帮助吗?
【问题讨论】:
-
所以你有
UIViewController和TableView,Main TableView的单元格有另一个TableView和CustomCell -
是的……没错。
标签: ios swift uitableview