Do you mean the title or section of the HeaderView? You can add subviews to the headerView in the method viewDidLoad:
- (void)viewDidLoad {
[super viewDidLoad];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 300, 225)];
label.text = @"BlaBla";
[self.tableHeaderView addSubview:label];
}
initWithFrame subview tableHeaderView - .
Header, tableView:viewForHeaderInSection:, :
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 50)];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 10, 300, 40)];
label.text = @"BlaBla";
[view addSubview:label];
[label release];
return [view autorelease];
}
tableView:heightForHeaderInSection:, :
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
return 50.0f;
}