我的 UINavigationController 工具栏是空白的,上面没有显示任何项目。这是我的代码
self.navigationController.toolbarHidden = NO;
UIToolbar* toolbar = self.navigationController.toolbar;
NSMutableArray *items = [[NSMutableArray alloc] init];
[items addObject:[[UIBarButtonItem alloc] initWithTitle:@"Test"
style:UIBarButtonItemStylePlain
target:self
action:@selector(buttonPushed)]];
[toolbar setItems:items animated:YES];