Is it possible to load a .xib
file without loading it via self.view
?
I have tried the following:
UINib *customNib = [UINib nibWithNibName:@"ViewControllerContact" bundle:nil];
ViewControllerContact *customView = [[customNib instantiateWithOwner:self options:nil] objectAtIndex:0];
[self.view addSubview:customView];
However, because the current class the code is executing doesn't have a view (it is just an NSObject
) it wont launch the .xib
.