0% found this document useful (0 votes)
14 views1 page

Rounded Border Text Field Styles in SwiftUI

The document describes a rounded border text field style with two corner options: 'circular' and 'continuous'. It highlights the differences between these styles using SwiftUI code to illustrate how each option appears visually. A screenshot is included to show the distinction between the two rounded rectangle styles.

Uploaded by

jon.moses2000
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

Rounded Border Text Field Styles in SwiftUI

The document describes a rounded border text field style with two corner options: 'circular' and 'continuous'. It highlights the differences between these styles using SwiftUI code to illustrate how each option appears visually. A screenshot is included to show the distinction between the two rounded rectangle styles.

Uploaded by

jon.moses2000
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

Creates a rounded border text field style.

Defines the shape of a rounded rectangle's corners.

This rectangular corner style has two options:


1. ``RoundedCornerStyle/circular``: The corners are quarter circles or ovals
2. ``RoundedCornerStyle/continuous``: The corners are smooth

These styles have subtle but noticeable differences:

```
struct ContentView: View {
var body: some View {
VStack(spacing: 20) {
RoundedRectangle(cornerRadius: 50, style: [Link])
.frame(width: 250, height: 150)

RoundedRectangle(cornerRadius: 50, style:


[Link])
.frame(width: 250, height: 150)
}
}
}
```

![A screenshot displaying two black rectangles with rounded corners stacked on top
of each other, with empty space in between. The top rectangle has 'circular'
corners, while the bottom has 'continuous', or smooth corners.](3680DF67-1241-4339-
[Link])

You might also like