(iPhone)如何更改tableview中行的字体大小

6

你好,我现在正在尝试更改一行的字体大小。在检查器中似乎没有这样的设置。而且我不知道要覆盖哪个委托方法。谢谢你的帮助 :)

3个回答

16

在你的cellForRowAtIndexPath方法中尝试像这样做:

//Configure the cell...
cell.textLabel.font = [UIFont systemFontOfSize:14]; //Change this value to adjust size
cell.textLabel.numberOfLines = 2; //Change this value to show more or less lines.
cell.textLabel.text = @"This is my text";

1
//font size
cell.textLabel.font = [UIFont systemFontOfSize:14];

0

我不确定这是否回答了你的问题,但是在你的cellForRowAtIndexPath代理中,你可以将cell.textLabel.font设置为UIFont


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接