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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:10:19+00:00 2026-05-22T02:10:19+00:00

I have created a UISplitViewApplication as my new project. In the potrait mode I

  • 0

I have created a UISplitViewApplication as my new project. In the potrait mode I have a button that when clicked will drop down a UITableView. It looks something as the following:

enter image description here

When I clicked on one of the rows, this UITableView is dismissed. Then when I click again on the Groups button, the layout of the UITableView presented is now all messy:

enter image description here

However, when I scroll the TableView so that some of the rows are reloaded again, those that are reloaded are then formatted fine. Why is this and how do I fix this?

Here’s my cell for row at index path:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"MyCell";

    MyCell *cell = (ConvoreCell *) [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    //if (cell == nil) {
        NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"MyCell" owner:nil options:nil];
        for (id currentObject in topLevelObjects){
            if ([currentObject isKindOfClass:[UITableViewCell class]]){
                cell = (MyCell *) currentObject;
                break;
            }
        }
        cell.delegate = self;
   // }


    if ([posts count] > 0){
         cell.star.hidden = YES;

        [lazyImages addLazyImageForCell:cell withIndexPath:indexPath];
        cell.title.text = [[posts objectAtIndex:indexPath.row] message];

        cell.detailed.autoresizesSubviews = YES;
        cell.detailed.text = [NSString stringWithFormat:@"%@", [[[posts objectAtIndex:indexPath.row] creator] username]];


        if ([[[posts objectAtIndex:indexPath.row] embeds] count] != 0){
            NSString * URL = [[[[posts objectAtIndex:indexPath.row] embeds] objectAtIndex:0] url];
            float height = [[(Embed * )[[[posts objectAtIndex:indexPath.row] embeds] objectAtIndex:0] height] floatValue];
            float width =  [[(Embed * )[[[posts objectAtIndex:indexPath.row] embeds] objectAtIndex:0] width] floatValue];
            [cell.embed setFrame:CGRectMake(cell.detailed.frame.origin.x, cell.detailed.frame.origin.y + 15, width, height)];
            cell.embed.image = [UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:URL]]];
        }

        if ([[[posts objectAtIndex:indexPath.row] stars] count] != 0){
            cell.star.hidden = NO;
            cell.star_creator.text = [(Login *)[[[[posts objectAtIndex:indexPath.row] stars] objectAtIndex:0] user] username];
        } 

    }
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    NSString *cellText =[[posts objectAtIndex:indexPath.row] message];
    UIFont *cellFont = [UIFont fontWithName:@"Arial" size:14.0];
    CGSize constraintSize = CGSizeMake(600.0f, MAXFLOAT);
    CGSize labelSize = [cellText sizeWithFont:cellFont constrainedToSize:constraintSize lineBreakMode:UILineBreakModeWordWrap];
    float height = 0.0;

    if ([[[posts objectAtIndex:indexPath.row] embeds] count] != 0)
        height =  [[[[[posts objectAtIndex:indexPath.row] embeds] objectAtIndex:0] height] floatValue];

    if (labelSize.height + 20 + height < 48)
        return 55;
    else
        return labelSize.height + height + 48;

}
  • 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-22T02:10:19+00:00Added an answer on May 22, 2026 at 2:10 am

    Reposted from a previous comment: reload the visible cells in viewWillAppear.

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

Sidebar

Related Questions

I have created drop down menu, but it is not showing in home page
I have created a mac application using the WebView. But issue is that webView
I have created an string in JSON format. It looks like: private String jString
Have created simple Ajax enabled contact forms before that have around 12 fields -
I have created some forms using zendframework on my local machine that send the
I have created a SeedData class, and populated it with the values that I
Have created a new property list, and deleted the original .plist (same filename). Deleted
Have created a ATL COM project through which I am inserting Menu Items to
Have created a custom navigation menu in wordpress that has some pages and some
I have created a little program that reads in a Java file and feeds

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.