Created
July 14, 2013 06:42
-
-
Save okumura/5993425 to your computer and use it in GitHub Desktop.
Create NSWindow Programatically
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
// init window. | |
NSWindow *window = [[NSWindow alloc] | |
initWithContentRect:NSMakeRect(0, 0, 100, 100) | |
styleMask:NSBorderlessWindowMask | |
backing:NSBackingStoreBuffered | |
defer:NO]; | |
// configure window. | |
[window setLevel:NSPopUpMenuWindowLevel]; | |
[window setHasShadow:NO]; | |
[window setIgnoresMouseEvents:YES]; | |
// show window. | |
[window makeKeyAndOrderFront:self]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment