iPhone SwiftUI layouts
Explore SwiftUI APIs, components, and modifiers with interactive iPhone previews, Swift code, and Apple documentation. Compare every available orientation, appearance, and design.
201elements
View
ControlSize
A control version that is the default size
Explore ControlSize on iPhone in portrait, with SwiftUI code and Apple API documentation.
SwiftUI code
VStack {
Button("Tap Me", action: action)
.buttonStyle(.borderedProminent)
.controlSize(.mini)
Button("Tap Me", action: action)
.buttonStyle(.borderedProminent)
.controlSize(.small)
Button("Tap Me", action: action)
.buttonStyle(.borderedProminent)
.controlSize(.regular)
Button("Tap Me", action: action)
.buttonStyle(.borderedProminent)
.controlSize(.large)
Button("Tap Me", action: action)
.buttonStyle(.borderedProminent)
// only on visionOS bigger than large
.controlSize(.extraLarge)
}
Compatibility
iOS 15.0+ iPadOS 15.0+ macOS 10.15+ watchOS 9.0+ tvOS 15.0+ visionOS 1.0+
Tags
Found an issue or have a suggestion?
All variants
Every available iPhone screenshot for ControlSize.