Currently, I am using CALayer to achieve ripple effect. However, the transparent color in SFSymbol causes an issue.
I am using the following way to setup UIImageView
imageView.image = UIImage(systemName: "mic.circle.fill")
imageView.tintColor = UIColor.red
The above code yield the following outcome. (Green color is CALayer with ripple animation)

Instead of transparent color, I would like the mic symbol to have solid white color. I try
imageView.image = UIImage(systemName: "mic.circle.fill")?.withRenderingMode(.alwaysOriginal)
It yields

Now, I get solid white color for mic symbol. However, the circle no longer solid red color.
I further try
imageView.image = UIImage(systemName: "mic.circle.fill")?.withRenderingMode(.alwaysOriginal).withTintColor(UIColor.red)

Now, it backs to the same problem again.
Do you have any idea, how can I have a SFSymbol, with
Thanks.
I can use the following code snippet
let image = UIImage(
systemName: "mic.circle.fill",
withConfiguration:UIImage.SymbolConfiguration(weight: .regular))?.applyingSymbolConfiguration(
UIImage.SymbolConfiguration(paletteColors:[
.white,
.label,
UIColor(red: 0.90, green: 0.22, blue: 0.21, alpha: 1.00)
])
)
This code snippet is generated from 3rd party software: San Fransymbols
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With