Objective c 如何更改表视图标题的颜色

Objective c 如何更改表视图标题的颜色,objective-c,iphone,Objective C,Iphone,我们可以改变表格视图标题的颜色吗?我显示的字符串是灰色的。我们可以为它选择颜色吗?表格视图标题有什么属性吗 我不是要表视图的页眉或页脚,我是指标题 - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { // Keep space in the following line ........ DONT REMOVE return [NSString string

我们可以改变表格视图标题的颜色吗?我显示的字符串是灰色的。我们可以为它选择颜色吗?表格视图标题有什么属性吗 我不是要表视图的页眉或页脚,我是指标题

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
 // Keep space in the following line ........ DONT REMOVE
 return [NSString stringWithFormat:@"Select your service:"];
}

通过实现,可以使用自定义标题视图

没有记录在案的更改标题颜色的方法。(未记录的方式是override
-[UITableHeaderFooterView setText:

我得到了这个-(UIView*)tableView:(UITableView*)tableView viewForHeaderInSection:(NSInteger)section{tempHeader=[[NSString alloc]initWithString:@“亲爱的”];tempHeader=[tempHeader stringByAppendingString:appDelegate.KFirstname];tempHeader=[tempHeader stringByAppendingString:@“选择您的服务:”];UILabel*v=[[UILabel alloc]init];v.textColor=[UIColor redColor];v.text=tempHeader;/[v.textColor.CGColor:[UIColor blackColor]];return v;}但我希望它看起来和看起来一样,只是红色应该出现在字符串中