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

Surfer picture Surfer · Feb 28, 2014 · Viewed 46.2k times · Source

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.

Answer

ncremins picture ncremins · Feb 28, 2014

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