Κυριακή, 25 Μαρτίου 2012

How to use your custom font (iOS)

In order to use your own fonts in your iOS application, simple do the following:
  1. Add your font's file in your XCode project
  2. Include an entry to your project's plist for "Fonts provided by application" and include the filename+extension of you custom font
  3. Add the font's file in "Copy Bundle Resources" in the Build Phase of your project's target. **Also include your project's plist if it is not already included.
  4. Use your custom font using the factory method 
    [UIFont fontWithName:@"Alison_Regular" size:(CGFloat)13.0];
    where "Aliston_Regular" should be replaced by the filename of your font
    and 13.0 should be replaced by the font that you want

LinkWithin

Blog Widget by LinkWithin

Mobile edition