Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7754923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:26:10+00:00 2026-06-01T12:26:10+00:00

So I have a root view with table view. I display the toolbar like

  • 0

So I have a root view with table view. I display the toolbar like this:

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    self.navigationController.toolbarHidden = NO;
}

And I implement the setToolbarItems method:

- (void)setToolbarItems:(NSArray *)toolbarItems animated:(BOOL)animated
{
    UIBarButtonItem *buttonItem;
    buttonItem = [[UIBarButtonItem alloc] initWithTitle:@"Hello" style:UIBarButtonItemStyleDone target:self action:@selector(goBack:)];
    self.navigationController.toolbarItems = [ NSArray arrayWithObject: buttonItem ];
}

The result is an empty tolbar. Why?

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:26:11+00:00Added an answer on June 1, 2026 at 12:26 pm

    From the docs:

    toolbarItems
    The toolbar items associated with the view controller.

    @property(nonatomic, retain) NSArray *toolbarItems
    Discussion
    This property contains an array of UIBarButtonItem objects and works in >conjunction with a UINavigationController object. If this view controller is >embedded inside a navigation controller interface, and the navigation >controller displays a toolbar, this property identifies the items to display in >that toolbar.

    You can set the value of this property explicitly or use the >setToolbarItems:animated: method to animate changes to the visible set of >toolbar items.

    In other words, try accessing it through the actual view controller, not it’s navigation controller like so:

    self.toolbarItems = [ NSArray arrayWithObject: buttonItem ];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys, I currently have a root table view which has a toolbar at
I have a navigation controller with a root view controller (UITableViewController). This table view
I have a root view controller with no nib file, I tried adding this
I have a data-driven table view. The root view displays a list of entities
I have an app with a table view at the root in a navigation
I have a root view which contains a table and a button. When I
I have root view with both tab bar and navigation bar visible at the
I have a UIWebView as the root view of a UINavigationController . When a
Root view is a UIImage View, it has subviews, those have subviews. My root
I have a very simple RootView Controller ->Detail View Controller, to display a list

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.