rectangle
A variant that encapsulates the symbol in a rectangle.
Declaration
static let rectangle: SymbolVariantsDiscussion
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)
}[Image]