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 4062112
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:33:28+00:00 2026-05-20T15:33:28+00:00

I have UItable with items. I have navigation bar etc. On one item in

  • 0

I have UItable with items. I have navigation bar etc. On one item in table “Category” I pust another UITable like this:

CategoryTableViewController *b = [[CategoryTableViewController alloc]init];
        [self.navigationController pushViewController:b animated:YES];
        [b release];

Now I want to add “ADD” button in navigation bar and I add UINavigationBarItem in *.xib connect it to outlets and add it like this in viewDidLoad:

self.navigationItem.rightBarButtonItem = self.addButton;

And this does not work (addButton is null), but when I put the same code for adding button in my first UITable it works fine and “ADD” button is added.

What could be the problem 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-05-20T15:33:28+00:00Added an answer on May 20, 2026 at 3:33 pm

    In the ViewController that should show the button in the navigation bar type in the viewDidLoad() method:

    self.addToolbarButton = [[[UIBarButtonItem alloc]           
    initWithTitle:@"Add", nil)
        style:UIBarButtonSystemItemAdd 
        target:self
        action:@selector (add)] autorelease];
    self.navigationItem.leftBarButtonItem = addToolbarButton;
    

    That will add a “add” styled button to the left in the navigation bar which calls the selector method:

    -(void) add {...}
    

    in the same class when it is tapped. In this method in the same class you can specify your add logic. If this method should be placed in a different class, set the target to that.

    That is the programatical way to solve this. The method “-(void) add” is what your Outlet has been in the .xib approach.

    For your .xib approach you should verify that the Outlet property for the navigationBarButton is set to retain.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On the first view. I have a UItable. When i tap one of the
I have an array, I want to save this in UITable, but it is
I have implemented my navigation controller and UITable View without using a NIB so
I have a trinidad table with one column contains drop downs (select one choice)
I have UITable which contains some UIButtons. I would like a way to use
I have a UITabBar with 2 views. One view contains a UITable. When I
I have a UITable View with a textfield that is editable right on the
I have been populating a UITable view cell with the data fetched from a
I have a subview over my UITable that is used as a busy view.
I have icons inside my application for uibutton & on uitable cell. Lets say

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.