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      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

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.