Here is my link:
Link("Terms + Conditions", destination: URL(string: "https://my.app/terms_and_conditions.html")!)
I'm aware that Text()
has an underline()
modifier, however there doesn't seem to be one for Link()
.
Any idea?
Link has an initialiser that takes a label argument:
init(destination: URL, label: () -> Label)
So for your example, you would need to set up a Text("Terms + Conditions")
view as the label, and use the .underline()
modifier on the text view to get the intended outcome.
Using Apples website as an example:
Link(destination: URL(string: "https://www.apple.com")!, label: {
Text("Apple")
.underline()
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With