Its possible to apply a custom tint color to SFSymbols image based on Appearance? By default it goes from black to white and viceversa, but I would like to customize those colors.
In short, this works as expected, switching from light to dark and viceversa, but I need the control of which tint to apply.
let image = UIImage(systemName: "car")
let imageView = UIImageView(image: image)
2
Answers
or create a custom color (2 colors) based on userInterfaceStyle and just use that:
You can create an image instance with different appearances for dark and light mode by adding additional variants to the imageAsset. For example:
Now
image
should be automatically rendered red in light mode and blue in dark mode.