Thi*_*ung 12 uitableview swift
我的表视图单元格有问题.使用带有嵌入式导航控制器的segue从详细视图返回到主表视图后,我无法禁用表格单元格选择的突出显示.表单元格仍处于选中状态.当我单击其中一个以显示详细信息时,我不希望禁用表格单元格选择.我只想在从详细信息视图返回后禁用它们.
Thi*_*ung 39
我现在明白了.我这样解决了.这是一个简单的理论.
我们在选择行时取消选择它
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
}
Run Code Online (Sandbox Code Playgroud)