In this project the goal is to make a drawing app made out of swift ui
First I am starting with shapes in swift ui
In swift UI we start of with a view
A view is a protocol and the ultimate goal for a swift ui view is to assign a single element conforming to a view to its body property
View types : Text views, images , and buttons.
Color and Shape both confrim to View : we can assign ones these to a view's body property.
struct ContentView: View {
var body: some View {
ZStack {
Color.teal
.ignoresSafeArea()
Image("ozma")
.resizable()
.scaledToFit()
.clipShape(Circle())
.overlay{
Circle()
.stroke(lineWidth: 8)
.foregroundColor(.white)
}
.frame(width: 250)
}
}
}