I'm trying to modularize a complex UI in several xib's.
I want to programaticly load each additional xib from file.
The xib has controls which are connected to the custom view code.
Then I try to load the xib the following way inside the main view controller:
WIFClientData *clientDataView;
NSArray* nibViews = [[NSBundle mainBundle] loadNibNamed:@"WIFClientData" owner:self options: nil];
clientDataView = [nibViews objectAtIndex:0];
[clientDataView configure];
The problem is that when I try to configure the view:
-(void)configure
{
self.name.label.text = @"Name";
self.mobile.label.text = @"Mobile";
}
name and mobile are nil
I currently don't have File's owner connect, or set to any custom class. I only have the view which is layed in the xib, set to the custom class.
I have been reading a lot of things regarding to this but haven't found the answer yet.
Can someone help me?
Nuno