在我的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;
}
表格视图没有显示导航栏。请帮我解决
答案 0 :(得分:0)
您是否正在创建 self.editButtonItem ? 使用此代码: -
[self.navigationItem setRightBarButtonItem:[[[UIBarButtonItem alloc]initWithTitle:@"Test" style:UIBarButtonItemStyleBordered target:self action:@selector(test:)]autorelaese]];