Type Property 型プロパティ

rectangle

A variant that encapsulates the symbol in a rectangle.

Declaration 宣言

static let rectangle: SymbolVariants

Discussion 議論

Use this variant with a call to the symbolVariant(_:) modifier to draw symbols in a rectangle, for those symbols that have a rectangle variant:


VStack(spacing: 20) {
    HStack(spacing: 20) {
        Image(systemName: "plus")
        Image(systemName: "minus")
        Image(systemName: "xmark")
        Image(systemName: "checkmark")
    }
    HStack(spacing: 20) {
        Image(systemName: "plus")
        Image(systemName: "minus")
        Image(systemName: "xmark")
        Image(systemName: "checkmark")
    }
    .symbolVariant(.rectangle)
}

A screenshot showing two rows of four symbols each. Both rows contain

See Also 参照

Getting Symbol Variants