Type Property 型プロパティ

none

No variant for a symbol.

Declaration 宣言

static let none: SymbolVariants

Discussion 議論

Using this variant with the symbolVariant(_:) modifier doesn’t have any effect. Instead, to show a symbol that ignores the current variant, directly set the symbolVariants environment value to none using the environment(_:_:) modifer:


HStack {
    Image(systemName: "heart")
    Image(systemName: "heart")
        .environment(\.symbolVariants, .none)
}
.symbolVariant(.fill)

A screenshot of two heart symbols. The first is filled while the

See Also 参照

Getting Symbol Variants