2

I have a label and i want make its font bold pragmatically.
I am trying this code.

[label1 setFont: [UIFont fontWithName:@"Helvetica LT Compressed" size:14.0 ]];
Nimantha
  • 6,405
  • 6
  • 28
  • 69
gauri
  • 71
  • 3

4 Answers4

1
[label1 boldSystemFontOfSize:14.0];
Nimantha
  • 6,405
  • 6
  • 28
  • 69
Krunal
  • 1,318
  • 1
  • 13
  • 31
0

You will have to Use bold version of the font,

[label setFont:[UIFont fontWithName:@"Helvetica-Bold" size :34];
Nimantha
  • 6,405
  • 6
  • 28
  • 69
Vignesh
  • 10,205
  • 2
  • 35
  • 73
0
label1.font = [UIFont boldSystemFontOfSize:14];
label1.font = [UIFont fontWithName:@"Helvetica LT Compressed" size:14];
Nimantha
  • 6,405
  • 6
  • 28
  • 69
Mobile App Dev
  • 1,824
  • 3
  • 20
  • 45
0

Bold fonts have another name that regular or italic ones.

If you want to know the exact name of a font, I suggest you to download the "Fonts" iphone application, on the appStore. It's free and it references every possible font that your phone handle.

It's not my app, it just an app that every iphone developer should have.

...and for helvetica, you have :

  • @"Helvetica"
  • @"Helvetica-Bold"
  • @"Helvetica-BoldOblique"
  • @"Helvetica-Oblique"
Martin
  • 11,881
  • 6
  • 64
  • 110