๐นview.foregroundStyle()
SwiftUI โฉ view โฉ drawing โฉ foreground โฉ style โฉ .foregroundStyle()
่จญๅฎๅๆฏๅ
็ด ็ ShapeStyleใ
HStack {
Image(systemName: "triangle.fill")
Text("Hello, world!")
RoundedRectangle(cornerRadius: 5)
.frame(width: 40, height: 20)
}
// โญ๏ธ view.foregroundStyle(shapeStyle)
.foregroundStyle(.teal).foregroundStyle()๏ผ่จญๅฎๅๆฏๅ ็ด ็ ShapeStyleใforeground element๏ผๅๆฏๅ ็ด
SwiftUI โฉ View โฉ .foregroundStyle(_:)
Last updated
Was this helpful?