The tint color on tableviewcell's default content config's image properties doesn't work.

Here is my code that sets the tint color of the image view in the tableview cell.

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {

        let cell = tableView.dequeueReusableCell(withIdentifier: "typeCell")
        
        var content = cell?.defaultContentConfiguration()

        // Configure content.
        content?.image = UIImage(imageLiteralResourceName:typesArray![indexPath.row])
        content?.imageProperties.maximumSize = CGSize(width: 28.0, height: 28.0)
        content?.text = typesArray![indexPath.row]
        content?.imageProperties.tintColor = UIColor(named:typesColorsArray![indexPath.row])
        
        cell?.contentConfiguration = content
        return cell!
    }
Answered by Frameworks Engineer in 790707022

Your image needs to be a template image in order for the tint color to have a visible effect on it.

Your image needs to be a template image in order for the tint color to have a visible effect on it.

The tint color on tableviewcell's default content config's image properties doesn't work.
 
 
Q