Contents

slash

A variant that draws a slash through the symbol.

Declaration

static let slash: SymbolVariants

Discussion

Use this variant with a call to the symbolVariant(_:) modifier to draw symbols with a slash, for those symbols that have such a 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(.slash)
}

[Image]

See Also

Getting symbol variants