thanks, with -[UINavigationController setViewControllers:animated:] I can "reset" the navigation controller on the right side, passing to this method an array with the only ViewController of the new view I have to represent. Why I can do it only at the first tap and after that nothing changes (the detail view remain the same that appears after the first tap)? Can I also use -[UINavigationController pushViewController:animated:] to go deep in the hierarchy after I have initialized the navigation controller in that way? It doesn't work!
thanks Andrea On Jul 20, 2010, at 1.55 PM, Michael Babin wrote: >Instead of -[UINavigationController pushViewController:animated:], use - [UINavigationController setViewControllers:animated:] when you want to "reset" the view controller stack. > >On Jul 20, 2010, at 3:08 AM, Andrea Mattiuz wrote: > >> thank you mmalc for the tip, >> but I don't have a navigation controller in the view xib file that I will >> charge, because I have an only navigation controller on the right side, >> declarated on the MainView xib file, an I work changing it. >> When I tap on the left side I modified the controller with this code, into a >> switch construct in the RootViewController: >> >> case 8:{ >> >> ViewSincronizzaViewController *viewSincronizza = >> [[ViewSincronizzaViewController alloc] initWithNibName:@"ViewSincronizza" >> bundle:[NSBundle mainBundle]]; >> self.viewSincronizzaViewController = viewSincronizza; >> viewSincronizza.navigationItem.title = [menu objectAtIndex:indexPath.row]; >> [mainDelegate.detailViewController.navigationController pushViewController: >> viewSincronizzaViewController animated:YES]; >> [viewSincronizza release]; >> } >> break; >> >> In this way it obviously continue to add a new controller on the stack, and I >> don't know hot to reset this stack, in a manner that when I tap on the left >> side I can show the navigation controller on the detail view, where I can't go >> back on the precedent page. >> Do you know something about this? _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com