title: popViewControllerAnimated not working, but back button works
body: <p>I am creating an application based on the Utility template. The main screen consists of a menu with several buttons, each of which creates a different flip-side view. In one of those flip-side views I also configured a Navigation Controller, which works perfectly as long as I have the NavigationBar activated... I can push the view but I have to use the "back" button to return to my flip-side view, which would be the root of the Navigation Controller. The problem comes if I try to go back using "popViewControllerAnimated", properly configured with a button, instead of the "back" button of the NavigationBar. My application crashes for some reason and I am not able to understand why. </p>
  
  <p>I could just use the "back" button in the NavigationBar and forget about the problem, but I would prefer to have my own button in order to go back.</p>
  
  <p>My app consists of the following:</p>
  
  <p>My APPDelegate.m:</p>
  
  <pre><code>- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
  
      MenuViewController *menuController = [[MenuViewController alloc] initWithNibName:@"MenuView" bundle:nil];
      self.menuViewController = menuController;
      [menuController release];
  
      menuViewController.view.frame = [UIScreen mainScreen].applicationFrame;
      [window addSubview:[menuViewController view]];
      [window makeKeyAndVisible];
  
      return YES;
  }
  </code></pre>
  
  <p>MenuViewController.m starting my flip-side view:</p>
  
  <pre><code>- (IBAction)showFuelUpliftView {    
  
      FuelUpliftViewController *controller = [[FuelUpliftViewController alloc] 
                                              initWithNibName:@"FuelUpliftView" bundle:nil];
      controller.delegate = self;
      controller.title = @"Fuel Uplift";
  
      UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:controller];
      [navController setNavigationBarHidden: NO];
      navController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
      [self presentModalViewController:navController animated:YES];
  
      [navController release];
      [controller release];
  }
  </code></pre>
  
  <p>FuelUpliftViewController.m, where I push the second view of the NavigationController with a button:</p>
  
  <pre><code>- (IBAction)showFuelUplift2View:(id)sender {
      UIViewController *controller = [[UIViewController alloc] initWithNibName:@"FuelUplift2View" bundle:nil];
      controller.title = @"Settings";
      [self.navigationController pushViewController:controller animated:YES];
      [controller release];
  }
  </code></pre>
  
  <p>And finally, my FuelUplift2ViewController.m, where the app crashes when trying to go back:</p>
  
  <pre><code>- (IBAction)backFromFuelUplift2View {
      [self.navigationController popViewControllerAnimated:YES];
  }
  </code></pre>
  
  <p>I do not know if all this makes sense, I am currently beginning with my first application and am still learning thanks to the traditional trial an error method. Nevertheless, I cannot see the reason for this problem and would appreciate any help I can get.</p>
  
  <p>Thanks very much,</p>
  
  <p>Manu</p>