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

  • Home
  • SEARCH
  • 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 695033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:55:04+00:00 2026-05-14T02:55:04+00:00

I have an UITableViewController which I would like to add UIToolbar to with one

  • 0

I have an UITableViewController which I would like to add UIToolbar to with one button. In the

- (void)viewDidLoad;

method of UITableViewController I have:

- (void)viewDidLoad {
[super viewDidLoad];

UIBarButtonItem *button = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd
                                                                             target:self
                                                                             action:@selector(pressButton1:)];

self.navigationItem.title = @"Some title";
self.navigationItem.leftBarButtonItem = button;
 }

Unfortunately I don’t see the toolbar when I run my app.
Any hints? Should I do something more?

  • 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-05-14T02:55:04+00:00Added an answer on May 14, 2026 at 2:55 am

    The navigationItem property of a view controller is useless if that controller is not displayed inside a UINavigationController.
    If your view controller is inside a navigation controller I don’t know what the problem is.
    Otherwise you can use an UINavigationItem but you need to create a UINavigationBar yourself.
    Either in the Interface Builder (add a UINavigationBar and add a UINavigationItem, then connect the UINavigationItem to a property outlet declared your view controller (you don’t need to connect the Bar).
    Or in your code :

    UIBarButtonItem *item = [[UIBarButtonItem alloc] 
                                 initWithBarButtonSystemItem:UIBarButtonSystemItemAdd 
                                 target:self action:@selector(pressButton1:)];
    
    UINavigationItem* navItem = [[UINavigationItem alloc] init];
    navItem.rightBarButtonItem = item;
    navItem.title = @"Your title";
    
    naviBar = [[UINavigationBar alloc] init];
    naviBar.items = [NSArray arrayWithObject:navItem];
    naviBar.frame = CGRectMake(0.0, 0.0, self.view.frame.size.width, 44.0);
    [self.view addSubview:naviBar];
    [navItem release];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a UITableViewController which implements UISearchDisplayDelegate and UISearchBarDelegate when I load i would
In my 'Sectioned' UITableView I have two sections, the first one for Attributes like
I have a typical UITableViewController set of views. On all views is a button,
I have a custom class which is a UITableViewController, this is inside of a
OK, I have a screen in my iPhone app that looks like the following:
I have a simple question. I have a normal UITableViewController displaying a UITableView. When
I have presented the viewController which contains a navigation controller whose view is loaded
I have a Sectioned Tableview sourced from a pList which I want to drill
I added the following code in my UITableViewController subclass, it shows something like in
I have two UITableViewControllers. One displays a list of names and on tapping any

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.