Skip to content

Instantly share code, notes, and snippets.

@jodell
Created February 29, 2012 23:39
Show Gist options
  • Save jodell/1945481 to your computer and use it in GitHub Desktop.
Save jodell/1945481 to your computer and use it in GitHub Desktop.
- (void)setupHeader {
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"PlanHeaderLabel" owner:self options:nil];
PlanHeaderLabel *planHeaderLabel = [topLevelObjects objectAtIndex:0];
[planHeaderLabel updateWithPlan:self.plan];
self.myTableView.tableHeaderView = planHeaderLabel;
// Need to adjust the scroll window
UIEdgeInsets insets = UIEdgeInsetsMake(0, 0, self.myTableView.tableHeaderView.frame.size.height, 0);
self.myTableView.contentInset = insets;
self.myTableView.scrollIndicatorInsets = insets;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment