1 Reply Latest reply: Jul 8, 2011 12:19 AM by Bigstorm
anand84 Level 1 Level 1

Hi all,

           As I know how to add navigation controller to viewController using coding but by using Interface Builder I am not able to do it.

 

Here is the code how I am coding.

 

  VC1 *vController  = [[VC1 alloc]init];

 

  UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:vController];

 

     [vController setModalPresentationStyle:UIModalPresentationFullScreen];

 

 

     aNAv.navigationBarHidden = YES;

 

     [aNAv presentModalViewController:nav animated:YES];

 

     [nav release];

 

     [vController release];

 

and these how I am using Interface Builder

 

image.png


MacBook Pro, Mac OS X (10.6.7)
  • Bigstorm Level 1 Level 1

    Don't init your navigationController, the xib connection do that automatically. The only line is that :

     

    [self.window addSubview:navigationController.view];

     

    And you must connect navigationCOntroller to your navigationController.Then you must write the nib in the SettingsViewController. (the nib name is the name of you xib).