views:

14

answers:

1

How to remove Navigation controller from stack?

When i push navigation controller it automatically get pushed into stack, after starting new navigational controller i want previous controller to get remove from stack. thanks in advance.

A: 

found solution.

UINavigationController *navController = self.navigationController;
                MyEditViewController *mevc = [[MYEditViewController alloc] initWithGizmo: gizmo];

                NSMutableArray *controllers = [[self.navigationController.viewControllers mutableCopy] autorelease];
                [controllers removeLastObject];
                navController.viewControllers = controllers;
                [navController pushViewController:objRateAndReview animated: YES];
Faisal khan