SwiftUI Advent Calendar Open

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.

Label

Label Reserved Icon Width

Set the width reserved for icons in labels.

Explore Label Reserved Icon Width on iPhone in portrait, with SwiftUI code and Apple API documentation.

VStack {
    Button("Bar", systemImage: "plus") {}
    Button("Foo", systemImage: "arrowshape.left.arrowshape.right") {}
    Button("Bar", systemImage: "plus") {}
        .labelReservedIconWidth(37)
}

Every available iPhone screenshot for Label Reserved Icon Width.

1 views