views:

263

answers:

2

I built an application. On the one my views I used TableView. So now I want to change this Table view to a navigation controller.

1- How can I change UITable view to Navigation Controller. I add navigation codes but I got some alert! [I know I must identify my navigation delegate, but HOW ?] alt text

Here is my Mapping Views!

AppNameViewController

  • FirstViewController [on this view I used table view and I want change to nav]

  • SecondViewController

  • ThirdViewControllerController
+2  A: 

As Xcode is telling you, there is no such method as -pushViewController: on UINavigationController. The method you're looking for is -pushViewController:animated:, as in

 [self.navigationController pushViewController:anotherViewController animated:YES];
Noah Witherspoon
oh god i had forgot it :))but still doesn't work and going to anotherViewController with nav !
Momeks
HELLOOOOOOOOOOOOo can everybody help me ??????????
Momeks
A: 

In app delegate's applicationDidFinishLaunching: method do this:

FirstViewController *firstVC = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:firstVC];

[window addSubview:[navigationController view]];

[secondVC release];
[navigationController release];
beefon