2009-11-24 5 views
0

Quand je pousser une vue sur mon point de vue contrôleurComment est-ce que je mets le rightBarButtonItem STAY quand un contrôleur de vue est enfoncé?

 
- (void)tableView:(UITableView *)tableView 
     didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
{ 
    AnotherViewController *anotherViewController = 
     [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil]; 
    [self.navigationController pushViewController:anotherViewController animated:YES]; 
} 

l'ARTICLE BOUTON DROIT de la NavigationController DISPARITION.

Y a-t-il un moyen de rendre le self.navigationController.rightBarButtonItem STAY THERE comme dans l'application "Notes" fournie avec l'iPhone?

Répondre

0

Je ne crois pas que vous pouvez sans utiliser des classes non documentées. Toutefois, si vous définissez la propriété rightBarButtonItem sur un élément qui a la même apparence, il ne devrait pas y avoir de grande différence.

0

Vous pouvez le faire avec

self.anotherViewController.navigationItem.rightBarButtonItem = self.parentViewController.navigationItem.rightBarButtonItem; 

après you've poussé les ChildViewController

Questions connexes