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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:56:17+00:00 2026-05-24T09:56:17+00:00

My VC is a subclass of UITableViewController and I’m trying to add a UIButton

  • 0

My VC is a subclass of UITableViewController and I’m trying to add a UIButton at the bottom of the screen.

I know how to do this when my VC is a UIView with a UITableView object in it, but how can I add this button when I’m subclassing UITableView? I tried adding it in IB but it only lets me add it as the table’s footer, which is only visible when the bottom of the table is scrolled to. Any ideas?

And also, how can I add an image behind the table while keeping the cells white? It’s easy when the class is UIView, but not sure in this case.

  • 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-24T09:56:19+00:00Added an answer on May 24, 2026 at 9:56 am

    Suggestion1 : You could have create a separate view which contains your UIButton and place below of the UITableView.

    Remark : This is useful because when you scroll the tableView the default footer will be stick to bottom.

    // position(change according to your position) of the bottom view 
                                                 //and set the size of the button
    
    UIView* bottomView = [[UIView alloc] initWithFrame:CGRectMake(5.0, 460.0, 300.0, 80.0)];
    UIButton *myButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    
    // position(change according to your position) of the button inside bottomView
                                                 //and set the size of the button
    myButton.frame = CGRectMake(20, 20, 200, 44);
    
    [myButton setTitle:@"Click Me!" forState:UIControlStateNormal];
    // add targets and actions
    [myButton addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
    // add to a view
    [bottomView addSubview:myButton]; // add the button to bottom view
    [self.view addSubView:bottomView]; //add bottom view main view
    

    Suggestion2 : you can use viewForFooterInSection delegate method. where you can create a view and add the UILabel. viewForFooterInSection returns the UIView, which you can return your view which contains the UILabel

    Remark : when you scroll the tableView the default footer will move along with your tableView

    NOTE :

    If your view is the subclass of UITableViewController, okay then change it to UIViewController and in your nib file Create a view and drag your tableView under the view and change the reference class to your UIViewController. Now create an IBOutlet of UITableView* myTableView and connect it to you nib file. you just need to change in your VC file for example self to [self.myTableView reloadData];

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

Sidebar

Related Questions

I have a subclass of UITableViewController. I have code that can add/remove a UISearchBar
How can I tell my UITableViewController to use my custom UITableView subclass for it's
I'm adding a UIView subclass to a UITableViewController subclass like this: [self.view addSubview:myUIView]; The
I want to subclass the built-in DropDownList in ASP.NET so that I can add
I'm trying to present a UIImagePickerController from a UITableViewController subclass using the following code:
Why can't I use List as class name of a subclass of UITableViewController?
My main controller is a subclass of UITableViewController with a UIToolBar at the bottom
I've been reading the documentation but I can't find a way to do this.
I created a UITableViewController in a UIViewController subclass and setup delegate methods but the
Sorry if this question has already been answered but I can't find an answer.

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.