I have read all the other user's accounts of problems, but they don't seem to conclude with a result that works for me or they end with 'I fixed it guys - thanks for the help', but then they neglected to share their solution. Here is my code to present and dismiss (all key objects are properties of my application delegate. I am trying to bring up an About page and then return to the application. What did I do wrong??
Present modal VC (works):
-(IBAction) showInfoButton: (id) sender {
NSLog(@"%s", __FUNCTION__);
if( aboutViewController == nil ) {
aboutViewController = [[[AboutViewController alloc] initWithNibName:@"About" bundle:[NSBundle mainBundle]] autorelease];
[appDelegate.window addSubview: aboutViewController.view];
}
appDelegate.modalNavigationController = [[UINavigationController alloc] initWithRootViewController:aboutViewController];
[appDelegate.modalNavigationController presentModalViewController:appDelegate.modalNavigationController animated: YES];
}
My dismiss from the About View Controller (does not work):
-(IBAction) dismissAbout: (id) sender {
NSLog(@"%s", __FUNCTION__ );
[self dismissModalViewControllerAnimated:YES];
}
I have tried animation 'NO', but that did not make any difference. I have tried to match my code with others' code, but that did not make any difference. I am going around in circles, so any help is appreciated.