The Util Designer
SwiftUI 畫有實心的圓圈
xcode 13.3.1, swift 5.5, iOS 15.4
2022-07-21
使用background用來填充圓形的顏色
實作代碼如下:
import SwiftUI

struct ContentView: View {
    var body: some View {
        Circle()
            .inset(by: 5)
            .stroke(lineWidth: 10)
            .foregroundColor(.green)
            .background(
                Circle()
                    .foregroundColor(.yellow)
            )
    }
}