apply shadow to transparent view in SwiftUI

Viewed 20

I want to make a view inside the dash (3 m/s) enter image description here

So I thought it would be fine if I apply a shadow to the outside of the transparent Circle. Like this. enter image description here

So I wrote the code below, but when I fill .clear color, I couldn't get a shadow.

Circle()
    .fill(.clear)
    .shadow(color: Color.black.opacity(0.3),
            radius: 10)
    .padding()

enter image description here

Any idea to apply shadow to transparent view?

0 Answers
Related