How to add a toolbar to the bottom of a UITableViewController in Storyboards?

if you want show toolbar in one view controller which placed in some navigation controller.

  1. select view controller in storyboard
  2. in utilities, show “attribute inspector”. select “bottom bar” style.
  3. add bar button item
  4. add code in view controller, to show and hide toolbar:

code:

- (void)viewWillAppear:(BOOL)animated
{
    [self.navigationController setToolbarHidden:NO animated:YES];
}

- (void)viewWillDisappear:(BOOL)animated
{
    [self.navigationController setToolbarHidden:YES animated:YES];
}

Leave a Comment