In Swift, as shown here, you can use "NSMutableAttributedString" to embed links in text.
How can I achieve this with SwiftUI?
I implemented it as follows, but that does not look how I want it to. .
import SwiftUI
struct ContentView: View {
var body: some View {
HStack {
Text("By tapping Done, you agree to the ")
Button(action: {}) {
Text("privacy policy")
}
Text(" and ")
Button(action: {}) {
Text("terms of service")
}
Text(" .")
}
}
}