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

  • Home
  • SEARCH
  • 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 716731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:19:57+00:00 2026-05-14T05:19:57+00:00

I have a label on a UITableView. When clicked it will refresh my tableview

  • 0

I have a label on a UITableView. When clicked it will refresh my tableview and set the top cell’s height. When I am setting the cell height, I am checking if a certain variable is TRUE. If true it will show the large height, if false, the smaller height.

At the time of cell height creation, my variable is always false. It is a member variable and its value is being set when the user clicks on the label.

How can I make sure that the variable is set before the table refreshes?

- (CGFloat)tableView:(UITableView *)tblView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    CGFloat rowHeight = 0;
    if(indexPath.row > 0)
    {
        TweetCell *cell = (TweetCell*)[self tableView:tblView cellForRowAtIndexPath:indexPath];
        rowHeight = cell.totalHeight;
    }
    else {
        if (reloadProfile) {
            rowHeight = profileCellHeight;
        }
        else{
            rowHeight = reloadCellHeight;
        }
    }

    return rowHeight;
}
  • 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-14T05:19:57+00:00Added an answer on May 14, 2026 at 5:19 am

    You probably want to set the initial value of your variable in the - (id)init method of your class.

    edit: Try manually refreshing the table immediately after setting the variable, in the same method in which you are setting the variable.

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

Sidebar

Related Questions

I have a UITableView cell and I need to set it's label to Sometext
I have a custom UITableView cell which has a button and a label. I
I have TableCellViewController for managing cells in my UITableView. Each cell has a label
I have a UITableView with cells containing variable-height UILabels. I am able to calculate
I have UITableView with cells. Cell contains image, label and detail label. Then I've
I have cells in UITableView , I have made custom frame for the label
I have set the size of the tableView that I show as the popoverController
I have UITableView with Custom View on it. For the bottom of the tableview,
I have a UITableView where each row may have a label anywhere from no
I have a big problem with an UITableView, I want to use a label

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.