Swift - Widget background transparent

Viewed 674

I am trying to set background color for my app widget to transparent, but having some issues.

It works fine by setting a color: .background(Color.white)

But I cant figure out how to make it transparent like this: enter image description here

I've tried like this: .background(Color.white.opacity(0.5)) but that just makes it gray. Any help please?

1 Answers

Agree with George.

Currently the only way to make a transparent widget is to add a relevant part of the home screen wallpaper (based on widget location) as an image for a widget. This way a widget will look like a fully transparent one, but only when there are no screen movements / animations

Related