我想在我的TableView中添加部分,如何使用swift3
我必须让我的TableView内部分:存储在“节”
var sections = SectionData().getSectionsFromData() // Declaration: [(key: String, value: [String])]
我所有的数据。在存储所有的ABC钥匙,和值所有以26个字母的一个启动的项目相应
我无法弄清楚如何访问值
我的代码:
var sections = SectionData().getSectionsFromData()
override func numberOfSections(in tableView: UITableView) -> Int {
// #warning Incomplete implementation, return the number of sections
return sections.count
}
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// #warning Incomplete implementation, return the number of rows
return sections.[section].count // error
}