Home > Software design >  what swift concept is .overlay and body
what swift concept is .overlay and body

Time:06-04

I'm following a basic swift guide but I'm struggling to understand this block of code:

struct CircleImage: View {
    var body: some View {
        Image("turtlerock")
            .clipShape(Circle())
            .overlay {
                Circle().stroke(.gray, lineWidth: 4)
            }
    }
}

specifically, what kind of swift concept/data structure is used in .overlay {} and var body: some View {} I've searched through the swift documentation and couldn't find related concepts.

CodePudding user response:

  • Related