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
- Solid white for mic symbol
- Solid red for the filled circle
Thanks.
I can use the following code snippet
This code snippet is generated from 3rd party software: San Fransymbols