Pointer to NSWindow Xib after loading it?

Posted by Brock Woolf on Stack Overflow See other posts from Stack Overflow or by Brock Woolf
Published on 2010-03-11T19:09:58Z Indexed on 2010/03/11 19:14 UTC
Read the original article Hit count: 453

Filed under:
|
|

In my code below, CustomWindow is a subclass of NSWindow.

CustomWindow *window = [[CustomWindow alloc] init];
if (![NSBundle loadNibNamed:@"NibName" owner:window])
[window center]; // doesn't work

How do you get a pointer to control your XIB after you load it so you can do things such as centering the XIB? What am i doing wrong here?

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about objective-c