我要讓UILabel的文本加粗使UILabel的文本加粗
infoLabel=[[UILabel alloc]initWithFrame:CGRectMake(90,150, 200, 30)];
[infoLabel setText:@"Drag 14 more Flavors"];
[infoLabel setBackgroundColor:[UIColor clearColor]];
[infoLabel setFont:[UIFont fontWithName:@"Arial" size:16]];
[infoLabel setTextColor:[UIColor colorWithRed:193.0/255
green:27.0/255
blue:23.0/255
alpha:1 ]];
這將是很好合並這個答案和如下:如果你想保留系統字體並將其設爲粗體: [infoLabel setFont:[UIFont boldSystemFontOfSize:16]]; – 2012-07-20 00:46:01