UILabel:你如何设置字体大小?
你如何设置UILabel的字体大小? 
我的代码:
 UILabel *myView = [[UILabel alloc] initWithFrame:RectFrame]; [myView setBackgroundColor:[UIColor blueColor]]; [myView setText:[NSString stringWithFormat:@" A"]]; [myView setFont:[12] ]; <--- Error [self.view addSubview:myView]; 
	
 [myView setFont:[UIFont systemFontOfSize:12]]; 
要么
 [myView setFont:[UIFont boldSystemFontOfSize:12]]; 
或为字体家族
 [myView setFont:[UIFont fontWithName:@"Helvetica" size:12]]; 
检查UIFont类。 之后,你可能会得到你为什么要这样使用它:
 [myView setFont:[UIFont systemFontOfSize:12]]; 
 UILabel *myView = [[UILabel alloc] initWithFrame:RectFrame]; [myView setBackgroundColor:[UIColor blueColor]]; [myView setText:[NSString stringWithFormat:@" A"]]; [myView setFont:[UIFont systemFontOfSize:12]]; [self.view addSubview:myView]; 
请记住,用户可以全局设置他们想要的文本的大小,所以你不应该使用固定的字体大小,如“12”。 使用以下字体:
 [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline] [UIFont preferredFontForTextStyle:UIFontTextStyleBody] [UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline] [UIFont preferredFontForTextStyle:UIFontTextStyleFootnote] [UIFont preferredFontForTextStyle:UIFontTextStyleCaption1] [UIFont preferredFontForTextStyle:UIFontTextStyleCaption2] 
我认为UILabel的默认值是Caption1,其他的会更大或者更小。 如果用户想在他或她的设备上使用大文本或小文本,他们将适应。 (如果用户select一个非常小的尺寸,字体大小12实际上可能比正常的标签大小更大)。
 如果你的UILabel的字体是在IB storyboard定义的,你只是想增加大小,那么这将工作,为我工作;) 
 [_label setFont: [_label.font fontWithSize: sizeYouWant]]; 
要么
 [self.label setFont: [self.label.font fontWithSize: sizeYouWant]]; 
别人说的另一种方法也起作用了:
 [_label setFont:[UIFont systemFontOfSize:13.0]]; 
迅速
 yourLabel.font = UIFont(name:"name of font-family you want", size: 9)