I have a View Controller inside my MainWindow.xib file that loads the nib "Cover" when loaded. Cover (and the rest of my pages) is simply a nib file containing it's Owner, First Responder and a View. There is also an associated class declaration.
In MainViewController.m I have:
- (void)viewDidLoad {
[[NSBundle mainBundle] loadNibNamed:@"Cover" owner:self options:nil];
[super viewDidLoad];
}
This successfully loads the Cover of my app. On a button press I'd like to have a function switch Cover with Page1. I tried:
-(IBAction)funcGoToPage:(id)sender{
[[NSBundle mainBundle] loadNibNamed:@"Page1" owner:self options:nil];
}
This function is also in MainViewController. I know the function is being called but It doesn't seem to do anything. Is the new nib showing up underneath the current nib? Do I have to release the current nib?