在代码中添加一个按钮到导航项

时间:2010-04-10 21:57:04

标签: objective-c iphone navigationitem

如何在视图控制器的导航项右侧添加按钮?

1 个答案:

答案 0 :(得分:3)

self.navigationItem.leftBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"About" style:UIBarButtonItemStyleBordered target:self action:@selector(aboutB)] autorelease];