TableView header customisation...
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
return @[@"Section 1",@"Section 2"] [section];
}
- (void)tableView:(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section
{
if([view isKindOfClass:[UITableViewHeaderFooterView class]]){
UITableViewHeaderFooterView *tableViewHeaderFooterView = (UITableViewHeaderFooterView *) view;
tableViewHeaderFooterView.textLabel.textAlignment = NSTextAlignmentCenter;
tableViewHeaderFooterView.contentView.backgroundColor = [UIColor colorWithRed:34/255.0 green:41/255.0 blue:56/255.0 alpha:1.0];
tableViewHeaderFooterView.textLabel.font = [UIFont fontWithName:@"Muli" size:15.0];
tableViewHeaderFooterView.textLabel.textColor = [UIColor whiteColor];
}
}
No comments:
Post a Comment