Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift - Widget background transparent

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?

like image 298
Erik Auranaune Avatar asked Jan 21 '26 17:01

Erik Auranaune


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

like image 112
Viktor Gavrilov Avatar answered Jan 23 '26 08:01

Viktor Gavrilov



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!