Get Updates By E-mail 

Article Written By:
Johann Dowa

Handy UIFont Categories Allowing Custom Font Usage In Interface Builder

  •  
  •  
  •  
  •  
  •  

One of the more tedious aspects of working with interface builder is using custom fonts.

Cedric Luthi has created a project called FontReplacer to solve this problem and explains this problem and exactly how FontReplacer solves this problem in the Readme:

If your project contains nibs with a lot of labels, it becomes tedious to setup an outlet for every label and change the font in the code for each outlet. Instead choose a font that you won’t be using anywhere in your app, e.g. Arial and use it in Interface Builder. Then create a mapping from Arial to your custom font, e.g. Caviar Dreams and let FontReplacer handle the replacement.

You simply need to add a key to your Info.plist file or NSDictionary and include the UIFont categories within your apps.

You can find FontReplacer on Github here with usage instructions and an example.

A very useful set of categories for working with custom fonts.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments