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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:07:12+00:00 2026-05-28T15:07:12+00:00

I am experiencing an extra gap between TTableTextItems in a TTSectionedDataSource under iOS5, the

  • 0

I am experiencing an extra gap between TTableTextItems in a TTSectionedDataSource under iOS5, the same code is not showing the extra space under iOS4.You can see it in image below.
, left side is IOS 4.3 and right side is iOS5.

enter image description here

My TTTableViewController code is:

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        self.variableHeightRows = NO;
        self.tableViewStyle = UITableViewStyleGrouped;
        self.autoresizesForKeyboard = YES;
    }
    return self;
}

- (void) createModel {
    self.dataSource = [[[NewDataSource alloc] init] autorelease];
}

- (id<UITableViewDelegate>)createDelegate {
    return [[[NewTableDelegate alloc] initWithController:self] autorelease];
}

The TTTableViewDelegate code is:

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
    if (section == 0) {
        return 70   ;
    }
    return 200;
}

And my TTSectionedDataSource:

- (void) tableViewDidLoadModel:(UITableView *)tableView {
    [super tableViewDidLoadModel:tableView];
    [self.sections addObject:@"Section 1"];
    [self.items addObject:[NSArray arrayWithObject:[TTTableTextItem itemWithText:@"TTTableTextItem1" URL:@""]]];
    [self.sections addObject:@"Section 2"];
    [self.items addObject:[NSArray arrayWithObject:[TTTableTextItem itemWithText:@"TTTableTextItem 2" URL:@""]]];
}

The problem is happening because the method - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section in the TTTableViewDelegate gets called 2 times (with values 1 and 0) under iOS4 and it gets called 4 times (values 1,1,0 and 0) under iOS5 this is why I can see the extra gap between TTTableTextItems.

Any ideas of why this is happening and how to prevent it?

  • 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-28T15:07:13+00:00Added an answer on May 28, 2026 at 3:07 pm

    The problem is related with the new behaviour of - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section under iOS5.

    From Apple documentation:

    Prior to iOS 5.0, table views would automatically resize the heights of footers to 0 for sections where tableView:viewForFooterInSection: returned a nil view. In iOS 5.0 and later, you must return the actual height for each section footer in this method.

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

Sidebar

Related Questions

Im experiencing an issue with a production server. I can connect to the server
I'm experiencing big problems using ExcelPackage, because sometimes the formulas are not updated (even
I'm experiencing a strange CSS spacing issue in Chrome (but not in Firefox and/or
I'm experiencing a challenging problem, which has not been solvable - hopefully until now.
I am experiencing problems when running some code that I am developing. It should
Experiencing jquery in rails through .js.erb templates; but completely puzzled by a simple problem
After experiencing numerous problems with a certain media player, it got me thinking is
When experiencing networking problems on client machines, I'd like to be able to run
I'm experiencing an issue on a test machine running Red Hat Linux (kernel version
I'm experiencing what I believe is a circular dependency issue with my PHP application.

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.