Я хочу сосредоточить заголовок на представлении таблицы, однако у меня есть 2 проблемы. Во-первых, у меня нет правильной высоты, а во-вторых, UILabel не похож на заголовок по умолчанию - шрифт/размер шрифта/цвет и т.д.... Есть ли лучший способ сосредоточить его и/или есть способ сделать он выглядит как заголовок по умолчанию.
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger) section
{
//section text as a label
UILabel *lbl = [[UILabel alloc] init];
lbl.textAlignment = UITextAlignmentCenter;
lbl.text = @"Header";
[lbl setBackgroundColor:[UIColor clearColor]];
return lbl;
}