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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:32:33+00:00 2026-06-12T05:32:33+00:00

I am using a UITableViewController , and what I would like to do is

  • 0

I am using a UITableViewController, and what I would like to do is to add a custom toolbar under the UIView.

I have tried enabling the toolbar of the navigationController (code below) but it won’t seem to work properly. UITextField won’t call delegates, and key presses of the text field are not shown in the textfield itself.

Using a toolbar like this is not my first choice, I would like to have my custom view under my UITableViewController where I can put my items, which acts like a UIToolbar. (stays as a UIView footer)

Code:

    self.navigationController.toolbarHidden = NO;
    // create toolbar objects
    UITextField *inputField = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, 230, 31)];
    inputField.backgroundColor = [UIColor clearColor];
    inputField.borderStyle = UITextBorderStyleRoundedRect;
    inputField.inputAccessoryView = self.navigationController.toolbar;
    inputField.returnKeyType = UIReturnKeyDone;
    inputField.delegate = self;


    UIButton *sendButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 50, 30)];
    sendButton.titleLabel.text = @"Send";
    sendButton.backgroundColor = [UIColor greenColor];

    // add objects into navigation controller
    self.toolbarItems = [NSArray arrayWithObjects:
                         [[UIBarButtonItem alloc] initWithCustomView:inputField],
                         [[UIBarButtonItem alloc] initWithCustomView:sendButton], nil];
  • 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-12T05:32:34+00:00Added an answer on June 12, 2026 at 5:32 am

    Instead of subclassing UITableViewController for your implementation, you might find it easier to subclass a plain UIViewController and add a UITableView to it. This would give you more flexibility in terms of customizing the layout.

    Basically the steps would be:

    1. Have your class inherit from UIViewController (instead of UITableViewController)
    2. Have your class
      implement the UITableViewDelegate and UITableViewDataSource
      protocols
    3. Implement the UITableViewDelegate and
      UITableViewDataSource methods in your class (e.g. cellForRowAtIndexPath:, didSelectRowAtIndexPath:, etc)
    4. In IB, add a
      UITableView as a subview to your view controller’s view
    5. Set the
      delegate and datasource properties of the table view you just added
      to be your viewcontroller class
    6. Resize the frame of the
      UITableView to allow space at the bottom for your inputField and button

    This way you can add the inputField and button to your viewController’s view (at the bottom) and they won’t scroll because they are separate from the tableview.

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

Sidebar

Related Questions

I would like to make an infinite scrolling on a UITableViewController , I'm using
i've UITableViewController which have static cell. I would like to show another detailed view
I am using a UITableViewController which uploads a table. I have a Nib File
In the tableView:cellForRowAtIndexPath: implementation of my UITableViewController subclass I'm using this code snippet: AlarmPicker
I'm trying to present a UIImagePickerController from a UITableViewController subclass using the following code:
I'm new to iOS development, I just have UITableViewController in a storyboard. I would
I have already created UITableViewController embedded in Navigator Controller using Storyboard and Interface Builder.
I would like for one tab in a UITabBarController to have a fixed position
Is there a way to add custom views above and below a UITableView ?
I'd like to create custom UITableViewCell using an XIB, but I'm not sure how

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.