この問題に対してすべてのスタックオーバーフローソリューションを試した後でも、まだイライラするほどうまくいきません。
//UIBarButtonItem declaration
UIBarButtonItem* button1 = [[UIBarButtonItem alloc] initWithTitle:@"Button Text"
style:UIBarButtonItemStyleBordered target:self action:@selector(myAction)];
//method 1
[self setToolbarItems:[NSArray arrayWithObjects: button1, nil] animated:YES];
//method 2
[self.navigationController.toolbar setItems:[NSArray arrayWithObject:button1]];
//method 3
self.navigationController.toolbarItems = [NSArray arrayWithObject:button1];
//displaying toolbar
[self.navigationController setToolbarHidden:NO];
上記の方法はどれも、ツールバーにボタンを表示するために機能しません - 私が得るのは空のツールバーだけです。ここで私が見逃している明らかなものはありますか?