I like to create a small custom view class named Configurator
that derives from UIView
. I would like the IBOutlets
and IBActions
to be placed in the Configurator
itself (and not in any view controller). I have created the layout in IB where I also indicated that the Files Owner belong to class Configurator
.
My problem is that when I load the view, using the code snippet below, I have to supply the owner. But the owner is the object beeing loaded.`
NSArray *arr = [[NSBundle mainBundle] loadNibNamed:@"configurator" owner:???? options:nil]; Configurator *viewConf = [arr objectAtIndex:0];
Question: How to load a view when its outlets and actions are contained in the view being loaded?
EDIT: My main-view will load the small Configurator-view and display it in a small part of the screen. I cannot set owner to self because that would imply that the outlets and actions where located in the main view.