I would like to display a phone number in a SwiftUI Text (or any View), and then make it clickable so that it will open the \'Phone\'.
Is there a way to do this with
Try this,
let strNumber = "123-456-7890" Button(action: { let tel = "tel://" let formattedString = tel + strNumber guard let url = URL(string: formattedString) else { return } UIApplication.shared.open(url) }) { Text("123-456-7890") }