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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T01:54:50+00:00 2026-06-15T01:54:50+00:00

So I am having a very basic issue. I have this UITableView within a

  • 0

So I am having a very basic issue. I have this UITableView within a view, and I would like to make this table’s height as high as it needs to be to display ALL the rows within the table. Therefore, I don’t want to be able to scroll, I just want all the rows to appear. (The rows are dynamic in quantity and height).

-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    CGSize cellSize = [[[_stepsArray objectAtIndex:indexPath.row]content] sizeWithFont:[UIFont boldSystemFontOfSize:18.0f] constrainedToSize:CGSizeMake(528.0f, CGFLOAT_MAX)lineBreakMode:NSLineBreakByWordWrapping];
    return cellSize.height;
}

If there are 20 rows, the table will be very high, but if there is only 1 row, it will be very small and the other content will not appear 19 rows below.

  • 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-15T01:54:52+00:00Added an answer on June 15, 2026 at 1:54 am

    if I understand it correctly, you should be able to add up the height for each row and adjust the tableview height based on that:

    CGFloat tableHeight = 0.0f;
    for (int i = 0; i < [_stepsArray count]; i ++) {
        tableHeight += [self tableView:self.tableView heightForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]];
    }
    self.tableView.frame = CGRectMake(self.tableView.frame.origin.x, self.tableView.frame.origin.y, self.tableView.frame.size.width, tableHeight);
    

    you can do this immediately after [tableView reloadData]

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

Sidebar

Related Questions

So i have this very basic ipad view controller and i was doing some
Im having a very strange problem, i have a complicated view that returns incorrect
Yes, I am having issues with this very basic (or so it seems) thing.
I'm having this very odd issue while trying to serialize a class for logging
I have a database to store people's quick links. This is a very basic
I have a VERY basic plot in R, and I'd like to solve two
I am very new to Classic ASP and Visual Basic. I am having trouble
Im having a very sneaky issue in Xcode and its Log Navigator. I've recreated
I'm having a very big struct in an existing program. This struct includes a
I'm having a very strange issue with Python's subprocess.Popen. I'm using it to call

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.