Button Sizing
The preferred sizing behavior of buttons in the view hierarchy.
Platform Compatibility
Tags
SwiftUI Code
HStack {
Button("Tap Me", action: action)
.buttonStyle(.borderedProminent)
.buttonSizing(.fitted)
Button("Tap Me", action: action)
.buttonStyle(.borderedProminent)
.buttonSizing(.flexible)
}