So, I have a Text in a SwiftUI view that has a custom SF symbol in it:
Text("This is some text with a \(Image(uiImage: UIImage(named: "customSFSymbol")!)) symbol.")
The problem is the following:
I want to make all that view white, but when I add the .foregroundColor(Color.white)
to the view, the SF Symbol stays in a black color.
You can see how it looks right now here
Thanks for your help in advance!
You can simply add .renderingMode(.template)
to the Image
Text("This is some text with a \(Image(uiImage: UIImage(named: "customSFSymbol")!).renderingMode(.template)) symbol.")