I’ve created an app which have a table view.I need to add title and a back button for that.Here is my code in viewcontroller.m file
-(IBAction)go:(id)sender{
TableViewController *sec=[[TableViewController alloc]init];
sec.modalTransitionStyle=UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:sec animated:YES];
self.title=@"test title";
UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:sec];
[self.navigationController presentModalViewController:navController animated:YES];
[navController release];
[sec release];
}
I need to add back button now and my title bar is not displayed.Guidance please.
You want to use the navigation controller’s “push….” method. In your app delegate, you create a UINavigationController, make the the window’s root view, and then create an UIViewController subclass and make that the root view of the UINavigation controller. When this view appears it will have a UINavigationBar showing.
Then you create this new tableview, and your UIViewController “pushes” that view using
Did I miss something???