How can I make the application inactive when I click a button?
macOS, Swift, storyboard
(I could find some approximations but only in iOS. I am looking for macOS: Detect if the application in background or foreground in swift)
I can put the window at the bottom but it is still active:
view.window?.level = NSWindow.Level(rawValue:
NSWindow.Level.normal.rawValue - 1)