connect tableView + tableView
<p>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.</p>

<p>my code like this:</p>

<p>`
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {</p>

<pre><code>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;
}`
</code></pre>

<p>and when I press the cell with index 0 in the simulator, the program is crash!</p>

<p>what's the problem? pleas help me ..</p>

<hr>

<p>No, I didn't override the <code>-initWithNibName</code>, I just use it as the same way here,but to push to ControlView NOT TableView.Also,no errors in debug console.
and I have tried to release the controllers after the switch block, but the program still crash :(
anyway, it's work when I write:</p>

<pre><code>displyAnnController *anController = [[displyAnnController alloc] initWithStyle:UITableViewStyleGrouped]];
</code></pre>

<p>instead of :</p>

<pre><code>displyAnnController *anController = [[displyAnnController alloc] initWithNibName:@"AnnView" bundle:[NSBundle mainBundle]]
</code></pre>

<p>Temporarily, I accept this just to complete my work! but I hope to find any help example because no need to be as group.</p>

<p>thanx all for help and recommendations. </p>
