You can also set the color in your cell class (the one that is a subclass of the UITableViewCell class). Set the tintColor property in the awakeFromNib method if you want the same color to apply to all rows in your table view. Like this:
override func awakeFromNib() { super.awakeFromNib() accessoryType = .checkmark tintColor = .red }
Of course, if you set the color in the cellForRowAt method of your view controller, you can use the indexPath parameter to your advantage to set different colors according to the displayed string.
Bruno campos
source share