In *AppDelegate.h I create a UINavigation Controller and make it a property
then in *AppDelegate.m I use
Why is it in the RootViewController.m I can call this?
navigationController doesn't belong to that class so why is it that I can call "self.navigationController"?
Code:
UINavigationController *navigationController;
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
then in *AppDelegate.m I use
Code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
RootViewController *rootViewController = [[RootViewController alloc]initWithNibName:@"RootViewController" bundle:nil];
navigationController = [[UINavigationController alloc]initWithRootViewController:rootViewController];
[self.window addSubview:navigationController.view];
[rootViewController release];
[self.window makeKeyAndVisible];
return YES;
}
Why is it in the RootViewController.m I can call this?
Code:
[self.navigationController pushViewController:secondLevelViewController animated:YES];
navigationController doesn't belong to that class so why is it that I can call "self.navigationController"?