【问题标题】:Can i reduce the font size of iphone tableview header我可以减小 iphone tableview 标题的字体大小吗
【发布时间】:2010-12-14 12:27:45
【问题描述】:

我需要减小表格视图标题的字体大小。我的字符串值有点长,它不适合标题。所以打算缩小尺寸。任何人都知道如何减小大小,以便我可以将字符串添加到我的表格视图标题中。

提前致谢, 世斌

【问题讨论】:

    标签: iphone fonts header size tableview


    【解决方案1】:

    您目前如何在表格视图的标题中设置字符串?

    我想您正在将表格的标题视图设置为 UILabel 对象:

    UILabel *headerLabel = [[[UILabel alloc] initWithFrame: CGRectMake(0, 0, 320, 50)] autorelease];
    headerLabel.font = [UIFont systemFontOfSize: 14];
    headerLabel.text = @"Nice and Long Table View Header Label String";
    tableView.tableHeaderView = headerLabel;
    

    你能像上面那样设置标签的字体吗?

    【讨论】:

      猜你喜欢
      • 2016-05-16
      • 1970-01-01
      • 1970-01-01
      • 2021-04-20
      • 2011-03-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多