2013-06-20 107 views
3

我有问题。我有动态桌面视图。所以我需要在textLabel中更改文本大小。 我想:如何更改UITableView中的textlabel大小

之一:

cell.textLabel.font = [UIFont systemFontOfSize:30.0f]; 

二:

cell.textLabel.font = [UIFont boldSystemFontOfSize:12.0]; 

三:

UIFont *myFont = [ UIFont fontWithName: @"Arial" size: 30.0 ]; 
cell.textLabel.font = myFont; 

但我为textLabel不改变。所以detailtextlabel - 完全改变,但文本标签 - 没有。我做错了什么?感谢

+0

你确定你设置的'textLabel'之后的文本? – Alexander

+0

wats detailtextlabel ?? – IronManGill

+0

详细文本标签 - 它是标准文本在tableview中的例子描述... – Genevios

回答

5

您可以用下面的尝试..

,但要确保你的U设置你的文字

[email protected]"Your TEXT Goes Here"; 

UIFont *myFont = [ UIFont fontWithName: @"Arial" size: 18.0 ]; 
cell.textLabel.font = myFont; 

希望它能帮助前编写代码。

+0

我粘贴此代码之前... static NSString * CellIdentifier = @“Cell”; UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 如果 { 细胞= [[ALLOC的UITableViewCell] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier](细胞!); } cell.textLabel.text = @ “在此输入文字”; UIFont * myFont = [UIFont fontWithName:@“Helvetica”size:11.0]; cell.textLabel.font = myFont;但没有什么 – Genevios

+0

等待让我试试你的代码..然后告诉你 –

+0

okey我等待谢谢! – Genevios

相关问题