我有一个UITableView
with 部分和我设置的标题,titleForHeaderInSection
如下所示:
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
{
return [NSString stringwithFormat :@"Section %d",section];
}
默认情况下,它带有灰色背景,文本颜色为白色。如何将其更改为其他颜色。?
通过谷歌,发现设置在viewForHeaderinSection
. 但我没有用它来设置标题。所以我不想在里面写。
我怎样才能把它写进去titleForHeaderInSection
?