我的 tableview
单元有一个严重的问题。所以这是场景:
- 在 TableView 中进入编辑模式
- 出现缩进复选标记,我喜欢通过点击来选择单元格 没有蓝色/灰色/任何选择样式。
我做了什么:
表格 View :
self.tableView.allowsSelectionDuringEditing = true
self.tableView.allowsMultipleSelectionDuringEditing = true
单元格:
self.selectionStyle = .none -> Results in no longer selectable cells
期望:
左边的复选标记没有该死的蓝色边框/灰色背景。
结果:
背景 View 可见,这会杀死单元格 subview (蓝色背景消失,白色文本不再可见等)
我已经测试但没有任何积极结果的内容:
Cell.appearence().selectedBackground.color = UIColor.clear
或
cell.selectedBackground.color = UIColor.clear
或
override var isSelected:... within the cell
也许你有什么想法。
最佳答案
试试这个:
Cell.selectionStyle = UITableViewCellSelectionStyle.none
关于ios - swift 3 : UITableViewCell disable selection style also disables selection,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42084532/