UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

Blurred widget background

Forums > SwiftUI

Hey everyone,

Some of the built-in iOS 14 widgets, like batteries or Siri Shortcuts, have a semi-transparent, blurred background to them, much like to new sidebars in macOS Big Sur. This has led me to two thoughs / questions.

Firstly, how would you make this? If you make an empty widget with, say, only a Text view, the widget gets a system background by default. Is there a way to override this?

And secondly, possibly more interesting: WidgetKit and widgets don't support integration with UIKit / AppKit, which means those widgets most likely aren't using a UIVisualEffectView / NSVisualEffectView for their backgrounds. Does this mean apple has a native SwiftUI blur view internally?

I'd love to read your thoughts on this.

--Jakub

3      

An Apple engineer replied to a forum thread to say this is currently impossible: https://developer.apple.com/forums/thread/655990

4      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.