Powered By Blogger

Thursday, October 4, 2012

How to add custom fonts to iPhone application?

Hi,

As of iOS 4.0 and later iOS version came, it has become very easy to add custom fonts to your iPhone/iPad/iPod applications. Here, some steps you have to follow in order to add custom fonts:

    1.    Add your custom font files into your project using XCode as a resource
    2.    Add a key to your info.plist file called UIAppFonts.
    3.    Make this key an array
    4.    For each font you have, enter the full name of your font file (including the extension) as items
           to the UIAppFonts array.
    5.    Save info.plist
    6.    Now in your application you can simply call
           [UIFont  fontWithName:@"CustomFontName" size:FontSize]
           to get the custom font to use with your UILabels and UITextViews, etc…

It’s very simple to integrate!

No comments:

Post a Comment