Search code examples
iosiphoneobjective-cuifont

How to set font name of UILabel as HelveticaNeue Thin in iOS?


I am creating UILabel, for the label i can set the font name as HelveticaNeue Regular, Light, UltraLight etc, But i unable to set the font name as HelveticaNeue Thin, it is not working as expected. I did like,

label.font = [UIFont fontWithName:@"HelveticaNeue-Thin" size:16];

Also i have searched on Google didnt got any solution. How to fix this issue? Thanks.


Solution

  • This font is bundled with iOS 7, so if you're targeting iOS 7 and above your

    label.font = [UIFont fontWithName:@"HelveticaNeue-Thin" size:16.0f];

    will work.

    However if you are targeting iOS 6.1 and below you'll need to embed the font