A shape used to draw a button's border.
Use the ``View/buttonBorderShape(_:)`` view modifier to apply the shape to
bordered buttons within a view hierarchy.
A rounded rectangle shape.
Use the ``View/buttonBorderShape(_:)`` view modifier to apply the shape
to bordered buttons within a view hierarchy.
- Parameter radius: The corner radius of the rectangle.
- Note: This has no effect on non-widget system buttons in macOS.
get · iOS 15.0+
roundedRectangle
TypeScript
static get roundedRectangle(): ButtonBorderShape
Swift declaration
static let roundedRectangle: ButtonBorderShape
A rounded rectangle shape.
Use the ``View/buttonBorderShape(_:)`` view modifier to apply the shape
to bordered buttons within a view hierarchy.
Describes this shape as a path within a rectangular frame of reference.
- Parameter rect: The frame of reference for describing this shape.
- Returns: A path that describes this shape.
get · iOS 17.0+
circle
TypeScript
static get circle(): ButtonBorderShape
Swift declaration
static let circle: ButtonBorderShape
A circular shape.
Use the ``View/buttonBorderShape(_:)`` view modifier to apply the shape
to bordered buttons within a view hierarchy.
get · iOS 15.0+
capsule
TypeScript
static get capsule(): ButtonBorderShape
Swift declaration
static let capsule: ButtonBorderShape
A capsule shape.
Use the ``View/buttonBorderShape(_:)`` view modifier to apply the shape
to bordered buttons within a view hierarchy.
- Note: This has no effect on non-widget system buttons in macOS.
get · iOS 15.0+
automatic
TypeScript
static get automatic(): ButtonBorderShape
Swift declaration
static let automatic: ButtonBorderShape
A shape that defers to the system to determine an appropriate shape
for the given context and platform.
Use the ``View/buttonBorderShape(_:)`` view modifier to apply the shape
to bordered buttons within a view hierarchy.
Skipped declarations
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
ButtonBorderShape.inset(by:)
This protocol needs associated types that cannot yet cross the bridge.