Switch to another view from the table using the nav controller hosted in the tabbar controller
I recently found a good tutorial on how to place a nib controller in a tabbar controller ("The nib way").
http://twilloapp.blogspot.com/2009/05/how-to-embed-navigation-controller.html
I continued from step two and added a navigation manager to the view.
What I don't understand is how I can use the navigation manager from my tableview controller and for example - (void) tableView: (UITableView *) tableView didSelectRowAtIndexPath: (NSIndexPath *) indexPath;
What I want to do is when the user selects a row, the other view has to navigate with the back button and whatever the navigation controller provides.
Thanks in advance!
Did you start with the Apple SimpleDrillDown sample? This particular code refers to this procedure:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
/*
Create the detail view controller and set its inspected item to the currently-selected item
*/
DetailViewController *detailViewController = [[DetailViewController alloc] initWithStyle:UITableViewStyleGrouped];
detailViewController.detailItem = [dataController objectInListAtIndex:indexPath.row];
// Push the detail view controller
[[self navigationController] pushViewController:detailViewController animated:YES];
[detailViewController release];
}
a source to share
The following was what I was looking for:
[[self navigationController] pushViewController:detailViewController animated:YES];
[detailViewController release];
Since I have specified a controller RootView
for my NavigationControllers
View, the self
responses to navigationController.
a source to share