【发布时间】:2018-01-30 11:37:31
【问题描述】:
我正在使用索引路径从 plist 文件加载我的表视图数据。 我以该教程为基础https://www.appcoda.com/expandable-table-view/
但是我做了一些修改,我现在的 plist 格式如下:
root : dictionary
viewController : Array
headerIDS : Array
cellIDS : Array
container : Array
index 0 : Array (Section)
index 0 : dictionary (cell info)
index 1 : dictionary (cell info)
这工作正常,但我希望某些部分不依赖于索引路径。
例如,我希望 1 个部分具有 1 种类型的单元格,并且单元格的数量从在线获取的数组中是动态的。
现在我通过将索引路径传递给我的模型来获取单元格,并将正确部分和行的正确单元格返回给我。
有什么建议我可以修改我的结构来做到这一点吗?
【问题讨论】:
标签: uitableview dynamic swift3 tableview plist