Fully updated for Xcode 11.3
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 Why the top iOS apps rely on Instabug for crash reporting. Crash reporting + Bug reporting + Customizable in-app surveys all in one SDK. Know which line of code caused the crash along with network logs, repro steps, and the session profiler to identify and resolve severe crashes quickly. See more detailed features comparison and try Instabug for free here.