0

When I push a view onto my view controller

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

the RIGHT BUTTON ITEM of the navigationController DISAPPEARS.

Is there a way to make the self.navigationController.rightBarButtonItem STAY THERE like in the "Notes" application that comes with the iPhone?

4

2 回答 2

0

我不相信你可以不使用无证类。但是,如果您将rightBarButtonItem属性设置为看起来相同的项目,则应该不会有太大差异。

于 2009-11-24T04:39:03.930 回答
0

你可以这样做

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

在你推送了 ChildViewController 之后

于 2013-02-20T01:29:57.257 回答