The following SwiftUI code works in Swift Playgrounds:
Circle()
.fill(.blue.shadow(.drop(radius: 10)))
but I can't figure out why it really works, here are my questions:
.blue is an instance of type Color, right?ShapeStyle.shadow() method, isn't it a static method?I have chatted with ChatGPT, Gemini, Claude, Perplexity, but no one can give me a reasonable explanation, please help.
The following SwiftUI code works in Swift Playgrounds:
Circle()
.fill(.blue.shadow(.drop(radius: 10)))
but I can't figure out why it really works, here are my questions:
.blue is an instance of type Color, right?ShapeStyle.shadow() method, isn't it a static method?I have chatted with ChatGPT, Gemini, Claude, Perplexity, but no one can give me a reasonable explanation, please help.
Thanks to @BenzyNeez, now I know there are TWO .shadow() methods in ShapeStyle:

shadow(_:)– Benzy Neez Commented Jan 2 at 22:03