Follow me: @vaberer
I like โ . Do not forget to โ this super convenient library.
Font Awesome swift library for iOS. No image icons any more. Using Font Awesome Swift library is very easy to use. Look at the demo app which shows all icons and their names or just visit FontAwesome.
- iOS 8.0+
- Xcode 6.3
CocoaPods is a dependency manager for Cocoa projects.
CocoaPods 0.36 adds supports for Swift and embedded frameworks. You can install it with the following command:
$ gem install cocoapods
To integrate Font Awesome Swift into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
pod 'Font-Awesome-Swift', '~> 1.0.0'
Then, run the following command:
$ pod install
Do not forget to import to your swift files where you want to use this library:
import Font_Awesome_Swift
- Copy
FAIcon.swift
andFontAwesome.ttf
files into your project - Check to import
FontAwesome.ttf
in project, "Project" > "Target" > "Copy Bundle Resources"
labelName.FAIcon = FAType.FAGithub
//or if you want to set an icon size, use:
labelName.setFAIcon(FAType.FAGithub, iconSize: 35)
buttonName.setFAIcon(FAType.FAGithub, forState: .Normal)
//or if you want to set an icon size, use:
buttonName.setFAIcon(FAType.FAGithub, iconSize: 35, forState: .Normal)
Standard font size:
```Swift barName.FAIcon = FAType.FAGithub ```Custom font size:
```Swift barName.setFAIcon(FAType.FAGithub, iconSize: 35) ```Patrik Vaberer, [email protected]
LinkedIn
Blog
Font Awesome Swift is available under the MIT license. See the LICENSE file for more info.