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

后端 未结 17 1421
不思量自难忘°
不思量自难忘° 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:50

    This may help someone else... I had about 90% of Font Awesome icons working in my project, except a handful of them I couldn't get them to display correctly. They'd instead display a "..." icon instead.

    After several hours of investigating unicode characters in Objective-C, I realised I was barking up the wrong tree! "..." isn't a FontAwesome icon, it's UIKit telling me that the frame of the UILabel is too small/font too large to display the text string! D'oh.

提交回复
热议问题