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

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

    You can also use the library FontAwesome+iOS for iOS

    Then you only need to use this code:

    label.text = [NSString fontAwesomeIconStringForIconIdentifier:@"icon-github"];
    // or:
    label.text = [NSString fontAwesomeIconStringForEnum:FAIconGithub];
    

提交回复
热议问题