【发布时间】:2017-07-13 14:08:52
【问题描述】:
我正在开发一个应用程序,我在集合视图单元格和其中包含的表格视图之间陷入困境。
我的第一个集合视图单元格包含一个带有表格视图单元格的表格视图。 每个表格视图单元格都包含保存的数据,选择一个单元格会发生两件事。
- 集合视图单元格应将索引更改为当前 +1
- 应将表格视图单元格数据(在本例中为标题和日期)传递到新的集合视图单元格标题属性。
另一方面是表视图存储在容器视图类中。我不确定这是否重要,但它是传递变量的额外层。
到目前为止,这是我卡住的地方
tableViewDidselectCode
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let header = LoadHeaderView()
let cell = tableView.dequeueReusableCell(forIndexPath: indexPath) as SavedTableViewCell
header.titleString = cell.taskLabel.text!
header.descriptionString = cell.clientLabel.text!
}
如何将其传递给
self -> ContainerView -> collectionCell[0] -> CollectionView -> collectionCell[1] -> tableView -> header?
【问题讨论】:
标签: ios swift uitableview delegates uicollectionview