I have a navigation app that has a section where you define your search parameters that is basically a uitableview of custom cells that do different things (uitextview, switches and labels)
What I am wanting to do is when the user selects a cell from the tableview it opens a new uitableview, when that view opens it will send a request to my database via php and get an xml response that will fill the table of that view. However I only want to use one uitableview for a few different cell selections in the previous view.I am wanting to know if I am able to specify the title of the subview when the a parentviews cell is selected.
I hope that explains what I am trying to achieve… If this is not the way for doing things could you let me know.. but from what I have been doing I think it is the correct way for doing things.
**Update
I am now trying to figure out how to define the title based off which cell was pressed, I am trying to do something like this..
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
// Navigation logic may go here. Create and push another view controller.
SearchResponseTableViewController *searchResponseTableViewController = [[SearchResponseTableViewController alloc] initWithNibName:@"SearchResponseTableViewController" bundle:nil];
// ...
// Pass the selected object to the new view controller.
[self.navigationController pushViewController:searchResponseTableViewController animated:YES];
if (indexPath = 1,3) { //<<--- not sure what to do here or if its possible
searchResponseTableViewController.title = @"manufacture";
}
[searchResponseTableViewController release];
}
Simple: before you push the view in
didSelectRowAtIndexPath:you specify the title, which is a property of the view controller.