Advertisement
priore

How to include ttf fonts to iOS app

May 21st, 2012
841
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Up till now there hasn’t been an easy way to add custom fonts to your iPhone applications. As of iOS 4 it has become very easy to do. Here is what you need to do in order to add custom fonts:
  2.  
  3. 1. Add your custom font files into your project using XCode as a resource
  4. 2. Add a key to your info.plist file called UIAppFonts.
  5. 3. Make this key an array
  6. 4. For each font you have, enter the full name of your font file (including the extension) as items to the UIAppFonts array
  7. 5. Save info.plist
  8. 6. Now in your application you can simply call [UIFont fontWithName:@"CustomFontName" size:12] to get the custom font to use with your UILabels and UITextViews, etc…
  9.  
  10. It’s that simple!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement