0
votes

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

1

1 Answers

1
votes

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.