๐ฐview modifier
A view modifier is used to customize the appearanceโฑbehavior of a view. Since modifiers are applied in order, swapping their positions can change the appearanceโฑbehavior of the resulting view.
Rectangle()
// โญ๏ธ view modifiers
.foregroundColor(.blue) // change appearance (foreground color)
.border(.green) // change appearance (border color)
view modifier examples
ViewModifier (protocol)
Last updated
Was this helpful?