How to integrate and use Font Awesome with Objective-C or Swift in an Xcode project?

后端 未结 17 1414
不思量自难忘°
不思量自难忘° 2020-12-12 18:07

So I am trying to use this font http://fortawesome.github.com/Font-Awesome/. I\'ve added the font as a resource and put it in the plist file. Here\'s how I am using it:

17条回答
  •  情歌与酒
    2020-12-12 18:47

    BEST solution for FA with XCode:

    1. Copy the icon you want from http://fontawesome.io/cheatsheet/ (I mean mark and copy the icon itself):

    1. Then add a label to your storyboard, and on its properties:

    • RED - Choose FontAwesome as family
    • GREEN - Set the size you want
    • BLUE - Paste here what you copied in the 1st step. (dont worry about the question mark - in the view you should see it properly).

    That's it.

    If you need to change the icon in the code - you can paste 1st step inside your code too:

提交回复
热议问题