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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:50:21+00:00 2026-05-27T09:50:21+00:00

I have put an UITableView inside a UIViewController and have copied code from UITableViewController

  • 0

I have put an UITableView inside a UIViewController and have copied code from UITableViewController over to my UIViewController to have it fulfill “Table data protocols” with UITableViewControllers default implementation and am following http://developer.apple.com/library/IOs/#documentation/UserExperience/Conceptual/TableView_iPhone/CreateConfigureTableView/CreateConfigureTableView.html#//apple_ref/doc/uid/TP40007451-CH6-SW10s chapter “Creating a Table View Programmatically” (with using ViewDidLoad instead of LoadView as I use IB and have a nib, I created an outlet for the UITableView named tableView).

Now in above links chapter the UITableView is assigned to self.view which is the UIView property of the UIViewController. Then scrolling the UITableView is working but the UITableView fills the entire screen hiding other view content such as an UIToolbar – probably as it is the sole content after being assigned to the view property.

If I omit the assignment, the other view content is in place an everything is sized properly, however the UITableView doesn’t scroll.

How do I achieve scrolling of the UITableView inside an UIViewController with the UIVC having static content (such as a toolbar)?

Here’s the relevant code:

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
    [super viewDidLoad];
    tableView.delegate = self;
    tableView.dataSource = self;
    [tableView reloadData];
    //self.view = tableView;
}
  • 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-27T09:50:22+00:00Added an answer on May 27, 2026 at 9:50 am

    If you have other content in the view controller that you are adding in interface builder then this will be part of the UIViewController’s .view property – when you assign the table view to this, you are removing all that content.

    If your table view is appearing normally but is not scrolling (how about selection? Does that work?) you may have disabled user interaction on it.

    You have mentioned in comments that there is nothing but empty cells in your table view – I think this is the cause of your problem. I have just created a sample project where I have added in a table view as a subview of the view controller’s view, and scrolling is fine – this is with me populating 100 dummy rows in there. If I don’t return anything for the datasource and delegate methods, then the table view does not scroll.

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

Sidebar

Related Questions

I have a UITableView put in edited mode. self.tableView.editing = YES; In this table
I have a UITableView that gets populated from CoreData via a controller that implements
I have a table view and I want to put a label on the
I have a UIViewController with a UITableView outlet that I am populating with cells
I have a UIViewController-> UINavigationBar + UITableView Just a bit more explanation I made
I have a view controller that lists some data in an UITableView . To
So I have a UITableView, and I want to put a check next to
I have a simple question. I have a normal UITableViewController displaying a UITableView. When
I have a UITableView where when I put it in editing mode, I want
I have a UITableView which loads through it's navigationController a new viewcontroller. This code

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.