Drowning in email? Try Inbox Zero to learn sane tips for dealing with high-volume email. And don’t miss the free Inbox Zero video. »
Register for free on 43 Folders to comment on articles, post to our forum, customize your visits, and much more. Current users can login now.
| EXPLORE 43Folders | THE GOOD STUFF |
Hmmm, what's required? You subclass NSWindow...
Hmmm, what’s required?
You subclass NSWindow and override - (BOOL)canBecomeKeyWindow to return YES.
Then you instantiate it, passing NSBorderlessWindowMask as the styleMask parameter of a call to NSWindow’s -initWithContentRect:styleMask:backing:defer:screen: initializer.
Then you probably want to pass something like CGShieldingWindowLevel() to NSWindow’s -setLevel: method before setting the window’s frame (CORRECTLY handling the case where -[NSScreen screens] returns an array of more than one item (i.e. you’re on a dual display box)) and putting it on-screen.
Oh, and don’t forget to capture some keystroke so people can get out of your fullscreen world!