0

在我的 tableview xib 中,我无法在运行时显示导航栏?我的编码如下

- (void)viewDidLoad
{
ar=[[NSMutableArray alloc]initWithObjects:@"When im happy..i...",@"When im sad.. i...",@"When i'm mad.i...",@"My worst habbit is....",@"The best thing about me is...",nil];
[super viewDidLoad];
self.title=@"Welcome";

self.navigationItem.leftBarButtonItem=self.editButtonItem;
}

表格视图不显示导航栏。请帮帮我

4

1 回答 1

0

你在创建self.editButtonItem吗?使用此代码:-

 [self.navigationItem setRightBarButtonItem:[[[UIBarButtonItem alloc]initWithTitle:@"Test" style:UIBarButtonItemStyleBordered target:self action:@selector(test:)]autorelaese]];
于 2012-08-22T05:33:13.577 回答