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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:01:49+00:00 2026-05-28T00:01:49+00:00

I actually create a UIScrollView with a UITableView inside it with interface builder. I

  • 0

I actually create a UIScrollView with a UITableView inside it with interface builder. I set the content size of my UIScrollView with:

scrollView.contentSize = CGSizeMake(self.view.frame.size.width, self.view.frame.size.height);

and I set my file’s owner view to the UIScrollView

I created an IBOutlet UITableView and I set it in the interface builder.

When the view is loaded. it displays the correct content size for my UIScrollView. But it doesn’t display the correct content size for my UITableView. Besides when I change the content size of my UIScrollView, it changes the content size of my UITableView as if both content size were related.

Anyone knows how can I keep the content size of my table view that I set in the interface builder?

  • 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-28T00:01:49+00:00Added an answer on May 28, 2026 at 12:01 am

    A UITableView is a UIScrollView. There are very few times when it would be useful to embed a UITableView inside a UIScrollView.

    Assuming you really do want this, you’ll need to do the following somewhere. Probably in your UIViewController in methods like viewDidAppear: or somewhere you after you populate the table view.

    // Set the size of your table to be the size of it's contents 
    // (since the outer scroll view will handle the scrolling).
    CGRect tableFrame = tableView.frame;
    tableFrame.size.height = tableView.contentSize.height;
    tableFrame.size.width = tableView.contentSize.width; // if you would allow horiz scrolling
    tableView.frame = tableFrame;
    
    // Set the content size of your scroll view to be the content size of your 
    // table view + whatever else you have in the scroll view.
    // For the purposes of this example, I'm assuming the table view is in there alone.
    scrollView.contentSize = tableView.contentSize;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Its regarding QTP can we create database checkpoints for Web applications actually while creating
I am trying to create a UIImage from a byte array that is actually
I'm in psql trying to create a table for a python admin. It's actually
ok, i want to kill my self, entire day with this problem. i set
I have a UIWebView inside UIScrollView . This idea is to be able to
Whenever I execute an INSERT OR REPLACE command to sqlite3, it's actually create duplicate
Using ASP.net MVC3 with C# I want to create a partial view that uses
Now that I can actually create an SVG marker here is my vision: The
I am confused about how to actually create a Graph using the boost library,
What are custom controls, and how do you actually create them using the iPhone

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.