Reputation: 9392
I'm sorry if this questions a bit basic, but how do you invoke a nib file through a button or a menubar item? What would the method be?
Upvotes: 0
Views: 92
Reputation: 364
I'm not sure what you mean by "invoke" a nib file, but if you want to dynamically load a nib file, you can use an NSBundle method:
[NSBundle loadNibNamed:@"MyNib" owner:object];
Here you're loading the a nib resource that's in your app bundle called "MyNib". The file's owner of the nib is set to "object". In Interface Builder, you'll want to set the class for the File's Owner to be the same as "object"
Upvotes: 2