Skip to content

Commit

Permalink
use the scroll view's contentInset
Browse files Browse the repository at this point in the history
  • Loading branch information
joshaber committed Aug 10, 2011
1 parent 75e589d commit aba29ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/UIKit/TUITableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ - (NSArray *)_freshSectionInfo
NSMutableArray *sections = [NSMutableArray arrayWithCapacity:numberOfSections];

int s;
CGFloat offset = [_headerView bounds].size.height;
CGFloat offset = [_headerView bounds].size.height - self.contentInset.top;
for(s = 0; s < numberOfSections; ++s) {
TUITableViewSection *section = [[TUITableViewSection alloc] initWithNumberOfRows:[_dataSource tableView:self numberOfRowsInSection:s] sectionIndex:s tableView:self];
[section _setupRowHeights];
Expand All @@ -265,7 +265,7 @@ - (NSArray *)_freshSectionInfo
[section release];
}

_contentHeight = offset;
_contentHeight = offset - self.contentInset.bottom;

return sections;
}
Expand Down

0 comments on commit aba29ba

Please sign in to comment.