๐ฐBackground/Overlay
// set background material
view
// material layer
// material works best when there is a background layer
.background(.ultraThinMaterial)
// background layer
.background(Image("Blob")) // image from assets
// a material with a particular shape
view.background(.regularMaterial, in: RoundedRectangle(cornerRadius: 8))
SwiftUI โฉ Drawing and Animation โฉ ShapeStyle โฉ Material
View โฉ
.background(_:in:fillStyle:) - background with a particular shape
Last updated