【发布时间】:2018-11-15 11:49:36
【问题描述】:
所以我一直在尝试将 Core Data 与记录信息的日志应用程序一起使用。在这种情况下,它是飞行时间。所以我输入数据,它使用核心数据来保存/存储是一个设定值,但我只让它在表格视图中显示少量保存的信息(见下面的代码)。
我需要帮助,所以我可以点击每个 tableViewCell 去一个 VC,它有用户输入到应用程序中的所有信息(因为它是一个日志)
如何才能让用户看到他们针对特定单元格的特定信息,这些单元格存储了不同的信息,因为它们都是不同的日志
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return logArray.count
}
//WHATS IN THE TABLE VIEW CELL FUNCTION/////
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath)
let log = logArray[indexPath.row]
cell.textLabel!.text = "Flight:" + " " + log.date! + " Click For More Info -->"
return cell
}
【问题讨论】:
标签: swift uitableview core-data