You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a func to set colors from RichTextContext:
// Method to update colors
public func setColor(_ color: ColorRepresentable, for key: RichTextColor) {
print("Setting color \(color) for key \(key)")
colors[key] = color
}
Hi @alelordelo - the string needs to be observed in some way for the change to update the UI. You can then use the setColor function in the RichTextContext to update any color.
Hi @alelordelo - the string needs to be observed in some way for the change to update the UI. You can then use the setColor function in the RichTextContext to update any color.
I created a func to set colors from RichTextContext:
And then I init like this:
Prints:
Setting color sRGB IEC61966-2.1 colorspace 0.5 0 0.5 1 for key foreground
But it does not get applied...
Is this correct? Or is there a better way to set a color from the context ?
The text was updated successfully, but these errors were encountered: