0

How can I add a toolbar on the left side of the splittview? I have a navigationcontroller and i already tried this:

UIToolbar *toolbar = [[UIToolbar alloc] init]; toolbar.barStyle = UIBarStyleDefault;

[toolbar sizeToFit];

UIBarButtonItem *infoButton = [[UIBarButtonItem alloc] initWithTitle:@"back" style:UIBarButtonItemStyleBordered target:self action:@selector(info_clicked:)];

[toolbar setItems:[NSArray arrayWithObjects:infoButton,nil]];

[self.navigationController.view addSubview:toolbar];

But it is noch working. It appears at the top and not at the bottom

MEMA

DeFlo
  • 141
  • 1
  • 1
  • 9
  • http://stackoverflow.com/questions/5958956/how-to-add-a-uitoolbar-to-a-uitableviewcontroller-programmatically This may help you. – hp iOS Coder Sep 27 '12 at 10:43

1 Answers1

1

You don't have to create your own toolbar for a UINavigationController, just set toolbarHidden to NO to use its built-in one and add your UIBarButtonItem to it.