Type Property 型プロパティ

square

A variant that encapsulates the symbol in a square.

Declaration 宣言

static let square: SymbolVariants

Discussion 議論

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


VStack(spacing: 20) {
    HStack(spacing: 20) {
        Image(systemName: "flag")
        Image(systemName: "heart")
        Image(systemName: "bolt")
        Image(systemName: "star")
    }
    HStack(spacing: 20) {
        Image(systemName: "flag")
        Image(systemName: "heart")
        Image(systemName: "bolt")
        Image(systemName: "star")
    }
    .symbolVariant(.square)
}

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

See Also 参照

Getting Symbol Variants