connect tableView + tableView
- by totato
Right now I have an indexed tableview that goes to a detail view but i want it to go to another tableview then a detail view.
my code like this:
`
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
displyAnnController *anController = [[displyAnnController alloc] initWithNibName:@"AnnView" bundle:[NSBundle mainBundle]];
DetailViewController *dvController = [[DetailViewController alloc] initWithStyle:UITableViewStyleGrouped];
switch (indexPath.row) {
case 0:
[self.navigationController pushViewController:anController animated:YES];
[anController release];
anController = nil;
break;
case 1:
[self.navigationController pushViewController:dvController animated:YES];
[dvController release];
dvController = nil;
break;
default:
break;
}`
and when I press the cell with index 0 in the simulator, the program is crash!
what's the problem? pleas help me ..