I'm trying to have my view hierarchy loaded through calls to loadNibNamed.
For a single nib, in my ApplicationViewController : UIViewController
:
- (void) loadView {
[super loadView];
[[NSBundle mainBundle] loadNibNamed:@"ApplicationViewController"
owner:self options:nil];
}
But then in SubViewController : ApplicationViewController
:
- (void) loadView {
[super loadView];
[[NSBundle mainBundle] loadNibNamed:@"SubViewController"
owner:self options:nil];
}
When I init SubViewController
, the view only contains its own nib file, how do I get the ones from super
too ?
I've tried to insert the objects returned from the call to NSBundle
, back into the calling UIViewController's own view hierarchy, but this didn't work out and some casting issues prevent me from being able to debug this...