I wish to place a screen before my curren RootViewController. So far I have made the following modification to MyAppDelegate:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//with this in the existing RootViewController loads correctly
//self.window.rootViewController = self.navigationController;
self.window.rootViewController = [[[HomePageController alloc] init] autorelease];
}
I’m not entirely sure how self.navigationController actually gets set to my RootViewController. Either way if I make the modification my HomePageController does load correctly, however I am then unable to push another view on top of it. I have a simple button on HomePageController that performs the following (note that HomePageController should load the currently named RootViewController, HomePageController is the view I want to sit above this):
RootViewController *rvC = [[[RootViewController alloc] initWithNibName:@"RootViewController" bundle:[NSBundle mainBundle]] autorelease];
[self.navigationController pushViewController:rvC animated:YES];
When this code runs nothing happens… I’m not entirely sure why, possibly something related to the navigationController? Maybe I havent put HomePageController above RootViewController correctly or in the best way?
You have no navgiationController currently installed.
To fix you have to replace
with
now you have navigationController installed and following
will do the right job.