I created a custom view in the interface designer with a few buttons in it. I created a class in the code for it as a “file owner” to connect buttons to action methods.
How can I use this class?
I can't just do that ...
StartScreen *ss = [[StartScreen alloc] initWithFrame: ...]; [self.window.contentView addSubView: ss]; ...
because it only creates an empty view. (of course: the StartScreen class still doesn't know anything about the nib file.)
I want to do something like:
StartScreen *ss = LoadCustomViewFromNib(@"StartScreen"); [self.window.contentView addSubView: ss];
or maybe I should say something like
[self iWannaBeANibWithName: @"StartScreen"];
in the StartScreen constructor?
Please help ... (by the way, I'm developing for Mac OS X 10.6)
source share