Code:
RootViewController.m
- (void)viewDidLoad
{
Fertility *fertility = [[Fertility alloc]initWithNibName:@"Fertility" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:fertility animated:YES];
[fertility release];
fertility = nil;
[super viewDidLoad];
}
AppDelegate :
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//set onFront equal to YES since firstViewController's view is showing
onFront = YES;
//tell the notification center to notify the app delegate if a @"DelegateFlipViewNotification" is received
//Nothing will happen as a result of this unless you uncomment the indicated lines in SecondViewController.m
NSNotificationCenter *dc = [NSNotificationCenter defaultCenter];
[dc addObserver:self selector:@selector(flipViews:) name:@"Flip" object:nil];
[window addSubview:navigationController.view];
[window makeKeyAndVisible];
Report *report = [[Report alloc]initWithNibName:@"Report" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:report animated:YES];
[report release];
report = nil;
// Add the navigation controller's view to the window and display.
return YES;
}
I am First displaying Main menu through RootViewController that is FertilityviewContrller . After adding Report UIViewController to Appdelegate its taking first menu of Report View . But i dont want report as first menu .I understood i am doing wrong calling report in didfinishlaunchingwithoption . how to call report after Fertility Uiviewcontroller.