Updated for Xcode 12.0
Any SwiftUI view can have its corners rounded using the
cornerRadius() modifier. This takes a simple value in points that controls how pronounced the rounding should be.
So, you can create a text view with 25-point rounded corners like this:
Text("Round Me") .padding() .background(Color.red) .cornerRadius(25)
SPONSORED Announcing NSSpain 2020: Remote Edition! An online, continuous conference for iOS developers. We’ll start on Thursday and finish on Friday, with talks, activities, and lots of fun for 36 hours, non-stop. Sound good? Join us!
Link copied to your pasteboard.