Created
May 24, 2020 18:30
-
-
Save rampatra/6698d95babaf944ecccbe37aecd7281c to your computer and use it in GitHub Desktop.
Show the window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Show Annotate Screen window and make it key | |
let window = annotateWindowController.window! | |
guard let screen = NSScreen.main else { return } | |
window.setFrame(screen.visibleFrame, display: true) | |
window.backgroundColor = NSColor.white.withAlphaComponent(0.001) | |
window.level = NSWindow.Level.popUpMenu | |
window.orderFrontRegardless() | |
window.makeKeyAndOrderFront(self) | |
NSApp.activate(ignoringOtherApps: true) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment