Question

I need to create a HUD-like window programmatically when the user press on my main view. Here's the code I use, but I only get a standard window.

videoWindow= [[NSPanel alloc]
      initWithContentRect:NSMakeRect(200.0, 200.0, 300, 200) 
      styleMask:NSTitledWindowMask | NSClosableWindowMask 
      backing:NSBackingStoreBuffered defer:YES];
[videoWindow makeKeyAndOrderFront:nil];

Perhaps I'm not using the right flags, but I didn't find in the documentation or on Google. Any thoughts?

Was it helpful?

Solution

You need to use NSPanel with the NSHUDWindowMask style mask.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top