make UILabel's text bold

Ali picture Ali · Jan 5, 2011 · Viewed 82.9k times · Source

I want to make UILabel's text bold

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 ]];

Answer

Manny picture Manny · Jan 5, 2011

If you want to retain the system font and make it bold:

[infoLabel setFont:[UIFont boldSystemFontOfSize:16]];