I have a navigation based application. The root view is a list of items. In this root view, you can click on a table cell for a detailed view of the element. Or you can go to the form to create a new item using the "Add" button in the navigation panel.
My question is, how can I switch from a form view to a detailed view after creating a new object?
I donβt want to click the detailed view at the top of the form, because I want the root table view to be what the user sees after clicking the nav back button, forming a detailed view.
I have tried the following. It appears in the root view perfectly, but after that the detailed view does not open.
[context save:&error];
[self.navigationController popToRootViewControllerAnimated:NO];
GoalDetailViewController *detailViewController = [[GoalDetailViewController alloc] initWithNibName:@"GoalDetailViewController" bundle:nil];
detailViewController.goal = goal;
[self.navigationController pushViewController:detailViewController animated:YES];
[detailViewController release];
Any help and guidance would be much appreciated :)
Hooray!