Buttons don't appear on the toolbar

432 views Asked by At

A simple question. How do I add toolbar items in combination with a TTLauncherViewController. I must do something very basic wrong, as the toolbar appears, but the button does not show:

self.navigationController.toolbarHidden = NO;
self.navigationController.toolbar.tintColor = [UIColor blackColor];

UIBarButtonItem *updateBttn = [[UIBarButtonItem alloc]
                               initWithBarButtonSystemItem:UIBarButtonSystemItemRefresh
                               target:self
                               action:@selector(updateData:)];


UIBarButtonItem *btnSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil ];

self.navigationController.toolbarItems = [NSArray arrayWithObjects:updateBttn, btnSpacer, nil];

[btnSpacer release];
[updateBttn release];
1

There are 1 answers

0
rob On BEST ANSWER

Could this be the issue?

http://www.iphonedevsdk.com/forum/iphone-sdk-development/22180-navigationcontroller-toolbar-wont-show-any-buttons.html

In short, it says that the toolbar is not a child of the navigation controller but the parent view.