Skip to content

Instantly share code, notes, and snippets.

@pratikshabhisikar
Created October 13, 2012 17:29
Show Gist options
  • Save pratikshabhisikar/3885461 to your computer and use it in GitHub Desktop.
Save pratikshabhisikar/3885461 to your computer and use it in GitHub Desktop.
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
static NSString *headerReuseIdentifier = @"TableViewSectionHeaderViewIdentifier";
UITableViewHeaderFooterView *sectionHeaderView = [tableView dequeueReusableHeaderFooterViewWithIdentifier:headerReuseIdentifier];
if (sectionHeaderView != nil) {
// No header view presents in reusable queue. Create a new header view…
}
// Configure header view.
sectionHeaderView.textLabel.text = @"I am header"; // Set your section header corresponding to the parameter section.
return sectionHeaderView;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment