Create cocoa borderless window using nib design
I am trying a full screen borderless full screen window. I can show it but it appears empty because开发者_如何学C I don't know how to tell it to use one of my NIB files. I am using following code to create the window:
int windowLevel = CGShieldingWindowLevel();
NSRect screenRect;
screenRect = [[NSScreen mainScreen] frame];
ventanaBloqueo = [[Escucha alloc]
initWithContentRect:screenRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO
screen:[NSScreen mainScreen]];
where 'Escucha' is a NSWindow subclass. How could I tell the window use one of my NIB designs?
Regards
I would use a window controller. It's much easier and more ordered.
For example:
NSWindowControllerSubclass* controller = [[NSWindowControllerSubclass alloc] initWithNibName:@"nibName"];
精彩评论