Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

abcdefg12345

macrumors 6502
Original poster
Jul 10, 2013
281
86
I'm trying to have a window full translucent window but my code is not working anyone know where i went wrong

Code:
@IBOutlet weak var visualeffect: NSVisualEffectView!

    func applicationDidFinishLaunching(_ aNotification: Notification) {
        visualeffect.blendingMode = NSVisualEffectBlendingMode.behindWindow
        visualeffect.material = NSVisualEffectMaterial.dark
        self.window.contentView?.addSubview(visualeffect)
        self.window.styleMask = NSWindowStyleMask.fullSizeContentView
        self.window.appearance = NSAppearance.init(named: NSAppearanceNameVibrantDark)
    }
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.