this is my flow navA-> navB->navC then when user press NavC back button he goes to navA
but when user again press navA he should go to navB but its going on navC i dont know why
in navC i did this
XMLAppDelegate *appDelegate=(XMLAppDelegate*)[UIApplication sharedApplication].delegate;
[self.view removeFromSuperview];
[appDelegate.window addSubview:appDelegate.preLoginNavController.view];
and in navA i am doing this to go to navB //this is preLoginNavController.m XMLAppDelegate appDelegate=(XMLAppDelegate)[UIApplication sharedApplication].delegate;
//appDelegate.RootNavController.shouldHasBackButton = YES;
[self.navigationController.view removeFromSuperview];
[appDelegate.window addSubview:appDelegate.navigationController.view];//[navigationController view]
and in appdidfinish()
[window addSubview:[preLoginNavController view]];
[window makeKeyAndVisible];**strong text**
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing a navigation controller is not supported' thats why i am using this a
appDelegate.newsNavController.shouldHasBackButton = YES;
[appDelegate.window addSubview:appDelegate.newsNavController.view];
do i need to push in the mehtod defined bu you or i can use in betwwen while adding subview??
like
AccountApplication* controller = [[AccountApplication alloc] initWithNibName:@"AccountApplication" bundle:nil];
// [self.navigationController pushViewController:controller animated:YES];
// [controller release];