To create round buttons we can add a corner radius to the square box around the text.
Code:
Text("Location")
.fontWeight(.bold)
.font(.title)
.padding()
.background(Color.blue)
.cornerRadius(40)
.foregroundColor(.white)
Output:
To create round borders is slightly more difficult however, but can be done by overlaying a border on the button itself.
Code:
Text("Location")
.fontWeight(.bold)
.font(.title)
.padding()
.background(Color.blue)
.cornerRadius(40)
.foregroundColor(.white)
.padding(10)
.overlay(RoundedRectangle(cornerRadius: 40).stroke(Color.blue,lineWidth: 5))
Output: