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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:27:12+00:00 2026-06-09T19:27:12+00:00

I have a table view that contains a static set of 2 rows (created

  • 0

I have a table view that contains a static set of 2 rows (created in storyboard). I have a specific UITableViewCell that contains a text box thats size is dynamically generated. I would like to also dynamically set the hight for the containing UITableViewCell, however setting the .frame for the UITableViewCell does not seem to be working. Has anyone done this programatically, without using tableView:heightForRowAtIndexPath: ?

Current code:

CGSize maximumLabelSize = CGSizeMake(296,9999);
CGSize expectedLabelSize = [self.place.details sizeWithFont:self.descriptionLabel.font 
                                  constrainedToSize:maximumLabelSize 
                                      lineBreakMode:self.descriptionLabel.lineBreakMode]; 

CGRect labelFrame = self.descriptionLabel.frame;
labelFrame.size.height = expectedLabelSize.height;
// this does not change the height of the UITableViewCell....
self.descriptionTableViewCell.frame = labelFrame;
  • 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-09T19:27:14+00:00Added an answer on June 9, 2026 at 7:27 pm

    As you’ve noticed regardless of the height of the UITableViewCell, it is clipped to the height of the UITableView‘s row for that index path. By the time tableView:cellForRowAtIndexPath: is called the row heights have already been laid out. Just use tableView:heightForRowAtIndexPath: as this is what it is intended for. A key point is that the table view needs to know the height of all its rows to set up its scroll view, scroll bars, etc. On the other hand it only needs to have the actual cells for what is on screen. See this answer for more discussion on why the UITableViewDelegate works this way.

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

Sidebar

Related Questions

I have a view controller with table view that contains 8 cells(sections).I have created
I have a grouped table view that contains 3 sections and each row per
I have a custom table view cell view that contains a button. I initialize
We have a modal view that contains a Table view that contains UITableViewCells used
I have a view controller that contains a table view, the items in the
I have a table view that I am customizing and I am adding a
I have a table view that is managed by an NSFetchedResultsController. I am having
I have one table view that should be filtered by values of search field
I have a table view controller with (among others) a cell that is to
I have a first table view and a segue that pushes to another table

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.