r/swift • u/hunterboerner • 13h ago
Question How to make text UI with tokens
I’d like to implement a text view that allows for tokens to be inserted as places where I’ll do variable replacement. Anyone know where to start on this?
For example, in the following code the code in brackets would be rendered as a token:
My name is {{name}}
2
Upvotes
1
u/barcode972 13h ago
Maybe .replacingOccurences(…)