UITableView 复选标记具有白色背景

UITableView checkmark has a white background

我使用填充整个单元格的图像视图自定义了表格视图单元格样式。调用 UIAlertAction 时会显示复选标记。但它在复选标记周围显示一个白框。

显示复选标记时背景图像缩小:

并且没有选中标记:

我试过:

让颜色=cell.contentView.backgroundColor cell.backgroundColor = 颜色

在 tableview(cellforrowatindexpath) 中,但它不起作用。

如何删除这个白色的附件视图?

尽量避免使用覆盖代码进行编辑

func tableView(tableView: UITableView, canEditRowAtIndexPath indexPath: NSIndexPath) -> Bool {
        // the cells you would like the actions to appear needs to be editable
        return false
    }

您可以使用 imageview 代替 accessoryview 来显示检查记录。