【发布时间】:2019-08-02 07:16:15
【问题描述】:
我有一个 UITableView 并在编辑时将多选设置为 true
tableView.allowsMultipleSelectionDuringEditing = true
在单元格配置(cellForRowAtIndexPath)中,我这样做:
cell.selectionStyle = .default
cell.accessoryType = .checkmark
所以当 tableView 设置为编辑模式时,我会在左侧看到蓝色复选标记选项。我想更改该配件的默认蓝色。我该怎么做?
【问题讨论】:
-
看到这个寻求帮助:Change color of accessoryType Swift
-
试试这个
cell.accessoryType = UITableViewCellAccessoryType.checkmark cell.tintColor = UIColor.red -
cell.tintColor 不能用于编辑复选标记,不知道为什么。
标签: ios swift uitableview uikit