0
我想获取表格视图单元格上的文本,然后获取它在数组中的索引。解开UITableView单元格文本
这是我使用的代码:
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath) as UITableViewCell
let indexOfCellString = event.index(of: cell.textLabel!.text)
}
,但我得到了以下错误:可选字符串类型
- 价值?
这到底是怎么回事不解开