macOS老板键隐藏应用
if(NSApplication.shared.isHidden){ NSApp.activate(ignoringOtherApps: true) NSApp.setActivationPolicy(.regular) } else{ NSApp.hide(nil) NSApp.setActivationPolicy(.accessory)//hide in dock }
if(NSApplication.shared.isHidden){ NSApp.activate(ignoringOtherApps: true) NSApp.setActivationPolicy(.regular) } else{ NSApp.hide(nil) NSApp.setActivationPolicy(.accessory)//hide in dock }