cell.textLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:8.0];
是否可以动态传递字体系列的名称和大小来标记 iPhone 中单元格的文本?
NSString *selectorString =@"Helvetica-Bold";
cell.textLabel.font = [UIFont fontNamesForFamilyName:@"%@",selectorString];
cell.textLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:8.0];
是否可以动态传递字体系列的名称和大小来标记 iPhone 中单元格的文本?
NSString *selectorString =@"Helvetica-Bold";
cell.textLabel.font = [UIFont fontNamesForFamilyName:@"%@",selectorString];
试试这个它可以帮助你。
UILabel *titlelbl=[[UILabel alloc] initWithFrame:CGRectMake(80, 0, 150, 40)];
titlelbl.font = [UIFont fontWithName:@"Helvetica-Bold" size:17];
titlelbl.textAlignment=UITextAlignmentCenter;
titlelbl.textColor=[UIColor blackColor];
#define FONT_HELVETICA_BOLD @"Helvetica-Bold"
#define FONT_SIZE 14.of
cell. textLabel.font=[UIFont fontWithName:FONT_HELVETICA_BOLD size:FONT_SIZE];
你可以这样设置
float fontSize = 14.0f;
NSString *selectorString =@"Helvetica-Bold";
cell.textLabel.font = [UIFont fontWithName:[NSString stringWithFormat:@"%@",selectorString] size:fontSize];