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.

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?
The problem is related with the new behaviour of
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)sectionunder iOS5.From Apple documentation: