I'm looking for a way to implement Liquid Glass effect in a Text
, and I have issues.
If I want to do gradient effect in a Text
, no problem, like below.
Text("Liquid Glass")
.font(Font.system(size: 30, weight: .bold))
.multilineTextAlignment(.center)
.foregroundStyle(
LinearGradient(
colors: [.blue, .mint, .green],
startPoint: .leading,
endPoint: .trailing
)
)
But I cannot make sure that I can apply the .glassEffect
with .mask
or .foregroundStyle
. The Glass
type and Shape
type argument looks like not compatible with the Text
shape itself.
Any solution to do this effect on Text
?
Thanks in advance for your answers.