DEV Community

Discussion on: How to Make a Button with SwiftUI

Collapse
 
maeganwilson_ profile image
Maegan Wilson

Here is the code sample:

Button(action: {print("Button was tapped")}) {
    Text("Tap")
}
.border(.blue, width: 3.0, cornerRadius: 10.0)
.padding(.all, 5.0)
Collapse
 
nunez_giovanni profile image
Giovanni Nunez

woohoo. thanks for the example :-)
I just realized you're also from Austin. Hello, and thanks, neighbor!

Thread Thread
 
maeganwilson_ profile image
Maegan Wilson

You're welcome!

Ah that's cool! Howdy!!

Collapse
 
nightsquid7 profile image
Nightsquid7

Awesome thanks! For some reason the apple documentation for border was buried beneath a bunch of links and I missed it. Glad you posted though!

Thread Thread
 
maeganwilson_ profile image
Maegan Wilson

I have a hard time with the Apple Documentation, so I like to share when I find something like that!