简体   繁体   English

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

[英]how to change color of table view title

Can we change the color of the table view title the string which i am showing appears in gray color can we choose color for it .Is there any property of table view title i am not asking for table view header or footer i mean the title 我们可以更改表格视图标题的颜色吗,我要显示的字符串显示为灰色,是否可以为其选择颜色。表格视图标题是否有任何属性,我不要求表格视图的页眉或页脚,我的意思是标题

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

You can use a custom header view, by implementing the -tableView:viewForHeaderInSection: method . 您可以通过实现-tableView:viewForHeaderInSection:方法来使用自定义标题视图。

There's no documented way to change the title color. 没有记录更改标题颜色的方法。 (The undocumented way is override -[UITableHeaderFooterView setText:] .) (未记录的方法是重写-[UITableHeaderFooterView setText:] 。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM