title: How to call another class on navigation controller and add it to app delegate
body: <p>I have created a view based application and in the appdelegate .h file I have created UINavigationcontroller object and added it to window subview. Next in the app did finish launching I had allocated and initialised a class that I want to be viewed when the app first launches with the navigation bar on the top of it.</p>
  
  <p>So this is the code I have did to add the class to navigation bar</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  {
      // Override point for customization after application launch.
  
      // Add the view controller's view to the window and display.
      [window addSubview:navController.view];
      //test is the class that i want to be viewed first when  the app launches first
      test *t = [[test alloc]initWithNibName:@"test" bundle:nil];
      [navController.view addSubview:t.view];
      [window makeKeyAndVisible];
  
      return YES;
  }
  </code></pre>
  
  <p>but the problem is my test class launches but it does not display the navigation bar. What may be the problem?</p>