Skip to content

Instantly share code, notes, and snippets.

@okumura
Created July 14, 2013 06:42
Show Gist options
  • Save okumura/5993425 to your computer and use it in GitHub Desktop.
Save okumura/5993425 to your computer and use it in GitHub Desktop.
Create NSWindow Programatically
// 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