In #SwiftUI we have a convenient way to set a view's background to a shape, like a capsule or rounded rectangle, using the background(_:in:) modifier.

This works great when we need to place a single shape behind a view: https://nilcoalescing.com/blog/SetAShapeAsBackgroundInSwiftUI/

Comments