There seem to be a lot of questions for older versions of Swift / Xcode, but for some reason it did not work with the latest update. I created NSVisualEffectView, blurryView and added a subview to my main view:
class ViewController: NSViewController { @IBOutlet weak var blurryView: NSVisualEffectView! override func viewDidLoad() { super.viewDidLoad()
But when I run it, the effect does not affect the window. (when I set it inside the window and overlay it on top of another, the blur works correctly, but I want the window to blur.) I also tried to do the same in the App Delegate class, but I can't connect my window as an output and therefore, cannot add a blurry view to the window. This is what the code looks like:
class AppDelegate: NSObject, NSApplicationDelegate { func applicationDidFinishLaunching(_ aNotification: Notification) {
To get an idea of โโwhat I'm looking for: NVVisualEffectView Vibrancy
user7363585
source share