I have standart UIBarButtonItem
UIBarButtonItem *share = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAction target:self action:@selector(share:)];
How to add her to UIToolBar? I've tried
self.toolbarItems = [NSArray arrayWithObject:share];
But it doesn't work. Need your help.
Can you be more specific than "it doesn't work"?
If you're trying to add an item to a toolbar that already has items, you'll need to modify the array of items:
[toolbar setItems:[NSArray arrayWithObject:share] animated:YES];
Make sure you have make a toolbar either an IBOutlet or added toolbar programatically
Make sure the toolbar isn't hidden; you could try adding the following to your view controller's
viewWillAppear:animated:
method: