Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
- {
- UIView *headerView = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, 30)] autorelease];
- if (section == integerRepresentingYourSectionOfInterest)
- [headerView setBackgroundColor:[UIColor redColor]];
- else
- [headerView setBackgroundColor:[UIColor clearColor]];
- return headerView;
- }
- UILabel *label = [[[UILabel alloc] initWithFrame:CGRectMake(10, 3, tableView.bounds.size.width - 10, 18)] autorelease];
- label.text = @"Section Header Text Here";
- label.textColor = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:0.75];
- label.backgroundColor = [UIColor clearColor];
- [headerView addSubview:label];
Add Comment
Please, Sign In to add comment