Quote:
Originally Posted by jsd
You almost certainly don't have a self.navigationController property. In your code, add the line as shown below:
Code:
NSString *nibName = @"FirstViewDetails";
UIViewController *targetViewController = [[FirstViewDetailsController alloc] initWithNibName:nibName bundle:[NSBundle mainBundle]];
// add this here:
NSLog(@"my nav controller is: %@", self.navigationController);
[self.navigationController pushViewController:targetViewController animated:YES];
Run it. I bet it will print null. You need to instantiate the nav controller somewhere. Are you doing everything in code or using nib files?
|
In finally found the issue and fixed it.
In fact, I centralized tabbar & navigation controllers in AppDelegate.
Because I did make a link betweed the NavigationController of FirstView and this AppDelegate, it didn't work.
I'd like to thank you for your time and help.
Next time, I will do more things by code, NIB files and Interface Builder are a little bit tricky ... even, when you are used, it's quite powerful.
Phil