细节披露用swift 3改变细胞上的颜色

时间:2017-03-03 20:13:31

标签: swift3 tableviewcell

我有一个问题,如何将颜色按钮从蓝色更改为白色(表视图单元格上的详细信息?)我尝试更改该按钮上的图像,但它隐藏了单元格右侧的箭头请帮帮我

以下我的代码:

 let cell = tableView.dequeueReusableCell(withIdentifier: "Cell") as? MovieDownloadedTableViewCell

     if let cell = cell {
                cell.accessoryView = nil
                cell.accessoryView = UIImageView(image: UIImage(named: "info"))
    }
}

非常感谢

1 个答案:

答案 0 :(得分:0)

要将detailDisclosureButton更改为白色,您需要将tintColor设为UITableViewCellwhite。因此,将单元格的tintColor设置为白色,您可以在界面构建器中设置此方法,也可以像cellForRowAt方法一样设置。

cell.tintColor = .white