iOS : How to use FontAwesome in Xcode project.

Umair Hassan Baig
Jun 30, 2017 · 2 min read

The benefits of using font-awesome for icons is that you can treat them just like text. It eliminates the need of using pngs of varied sizes or varied colors of a same icon as you can just set the font size or font color to induce the effect of your desire.

  1. Download font-awesome from http://fontawesome.io/
Font-awesome Web Page. Click the Download

2. Add the fontawesome-webfont.ttf to your project.
3. Make sure you have checked the membership of the fontawesome-webfont.ttf file in the target you want to use the font. You can do this by selecting the file in your project navigator.

4. Open your project’s Info.plist file and add the key “Fonts provided by application in your” and add the name of .ttf file under it.

5. Now open http://fontawesome.io/cheatsheet/ and select the “ICON” of your desire like shown below and press “command + c” i.e copy

6. Now open your xib with the interface builder. Suppose we are using this icon on a button as shown below. Now select the button and paste that icon you have copied in the Title field shown in Attribute Inspector. After that select the font of the button to be “FontAwesome”. You can also set it programmatically for sure.

Sample xib: Icons shown with font awsome

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade