Question

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];
Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top