我有一个表格单元格视图,目前有一个日期和标题。但我也想添加当前时间,但我似乎无法在单元格中添加另一个部分。有人可以告诉我怎么做吗?
这是我的 cellForRowAt:
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "ContactCell", for: indexPath)
let contact = userInput[indexPath.row]
cell.detailTextLabel?.numberOfLines = 3
cell.detailTextLabel?.text = contact.value(forKey:"thf") as? String
cell.textLabel?.text = contact.value(forKey:"date") as? String
return cell
}
我不介意在任何地方添加时间,但最好是在明显的地方