help with navigation for iphone
<p>this is my flow
<strong>navA-> navB->navC</strong>  then when user press NavC back button he goes to navA</p>

<p>but when user again press navA he should go to navB  but its going on navC  i dont know why</p>

<p>in navC i did this</p>

<pre><code>XMLAppDelegate *appDelegate=(XMLAppDelegate*)[UIApplication sharedApplication].delegate;
    [self.view removeFromSuperview];
    [appDelegate.window addSubview:appDelegate.preLoginNavController.view];
</code></pre>

<p>and in navA i am doing this to go to navB
//<strong>this is preLoginNavController.m</strong>
    XMLAppDelegate <em>appDelegate=(XMLAppDelegate</em>)[UIApplication sharedApplication].delegate;</p>

<pre><code>    //appDelegate.RootNavController.shouldHasBackButton = YES;
    [self.navigationController.view removeFromSuperview];
    [appDelegate.window addSubview:appDelegate.navigationController.view];//[navigationController view]
</code></pre>

<p>and in appdidfinish()</p>

<pre><code>[window addSubview:[preLoginNavController view]];
    [window makeKeyAndVisible];**strong text**
</code></pre>

<p><strong>Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing a navigation controller is not supported'</strong> thats why i am using this a</p>

<pre><code>appDelegate.newsNavController.shouldHasBackButton = YES;
 [appDelegate.window addSubview:appDelegate.newsNavController.view];
</code></pre>

<p>do i need to push in the mehtod defined bu you or i can use in betwwen while adding subview??</p>

<p>like</p>

<pre><code>AccountApplication* controller = [[AccountApplication alloc] initWithNibName:@"AccountApplication" bundle:nil];
        //      [self.navigationController pushViewController:controller animated:YES];
        //      [controller release];
</code></pre>
