Swift Font Awesome is a Swift extension for NSString. Easily use the icons from Font Awesome in your Swift project.
- Enums for all of the icons, insert icons quick and easy with autocomplete
- Use the class names from the Font Awesome website
- Updated to Font Awesome version 4.2.0
- iOS 7.0+ / Mac OS X 10.9+
- Xcode 6.1
You have to include the FontAwesome.ttf
font-file (download here) and include it in your project. Then add the file to the Fonts provided by application key in your projects' plist file. Then add NSString+FontAwesome.swift
to your project.
var label = UILabel()
label.font = UIFont(name: "FontAwesome", size: 16.0)
label.text = NSString().fontAwesomeIconStringForEnum(.FAGithub)
label.text = NSString().fontAwesomeIconStringForIconClassName("fa-github")
Learn more about Font Awesome on it's website
Swift Font Awesome is available under the MIT license. See LICENSE for details.
Please note that Font Awesome has it's own license.