我们如何改变tableview标题的字体?
我正在为 tabelView 使用一些背景颜色,并且样式已分组。各部分标题中的文本不清楚,因此我需要修改文本颜色,以便标题文本应该可见。 我想知道我们可以更改标题文本的颜色和大小吗?
I am using some background color for the tabelView and style is grouped. The text in the header for the sections is not clear so I need to modify the the text color so that the header text should be visible.
I want to know can we change the header text's color and size?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
添加到 terente 的答案:
您可以使用
[UIFont fontWithName:@"" size:24.0];
对于其他字体Adding to terente's answer:
You can use
[UIFont fontWithName:@"<name of your font>" size:24.0];
for other fonts只需实现
并返回标题的自定义视图即可。
编辑:
Just implement
And return your custom view for header.
Edit:
您可以从其他表视图委托方法设置文本标签。
and you can set the text label from the other table view delegate method.
注意:
pointSize
不变。willDisplayFooterView
。Your-Font-Name
更改为您的字体。Notes:
pointSize
the same.willDisplayFooterView
.Your-Font-Name
to your font.我们可以使用 header.textlabel 对象来更改该标签的其他“UILabel”属性。
We can use header.textlabel object to change other "UILabel" properties for that label.