How to display a new view from a nib ?
how to
display a new view from a nib in the main window after clicking on a button.
When I click a the button named for example "goToGokyo", the link to my procedure
runs correctly because I see my NSLog message "goToGokyo button pressed".
My nib, which name is "GokyoViewController" does exist.
I did as follow for the moment but I'm stuck now, my nib :
- (IBAction)goToGokyo:(id)sender
{
NSLog(@"goToGokyo button pressed");
//[self stopSound];
if (gokyoViewController == nil)
{
GokyoViewController *aGokyoViewController = [[GokyoViewControlleralloc]
initWithNibName:@"GokyoViewController" bundle:nil];
self.gokyoViewController = aGokyoViewController;
//[aGokyoViewController release];
}
[self GokyoView:gokyoViewController animated:YES completion: nil];
}
Thanks in advance for your advice.
Cheers