When trying to set window level in swift
im getting Use of unresolved identifier 'window'
error using:
window.level = Int(CGWindowLevelForKey(Int32(kCGScreenSaverWindowLevelKey)))
or
window.level = NSScreenSaverWindowLevel
Ive Checked here How to set window level in Swift
Here Mac OS X, make a window go over menu bar
Here NSWindow Class
I cant seem to access NSViewController
or NSWindowController
window property
Update for Swift 2:
panel.level = Int(CGWindowLevelForKey(CGWindowLevelKey.PopUpMenuWindowLevelKey))
Subclass NSWindowController
in windowDidLoad()
window?.level = Int(CGWindowLevelForKey(Int32(kCGScreenSaverWindowLevelKey)))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With